/*==============================================================*/
/* DBMS name:      ORACLE Version 11g                           */
/* Created on:     4/20/15 14:05:30                             */
/*==============================================================*/


DROP TRIGGER "TIB_RLA_INTERFACECALLRECORD"
/

DROP TRIGGER "TIB_RLA_LOGINLOG"
/

DROP TRIGGER "TIB_RLP_TRACK_RECORD"
/

DROP TRIGGER "TIB_RLA_SMSRECORD"
/

DROP TRIGGER "TIB_RLB_ATTACHMENT"
/

DROP TRIGGER "TIB_RLB_HOTNEWS"
/

DROP TRIGGER "TIB_RLB_INDEXPIC"
/

DROP TRIGGER "TIB_RLB_MSGS"
/

DROP TRIGGER "TIB_RLB_NOTES"
/

DROP TRIGGER "TIB_RLB_NOTICE"
/

DROP TRIGGER "TIB_RLB_RISK_CATEGORY"
/

DROP TRIGGER "TIB_RLB_RISK_MODEL"
/

DROP TRIGGER "TIB_RLB_RISK_OPTIONS"
/

DROP TRIGGER "TIB_RLB_RISK_PROBLEM"
/

DROP TRIGGER "TIB_STORY_SHARE"
/

DROP TRIGGER "TIB_RLD_ABOUT_US"
/

DROP TRIGGER "TIB_RLD_APPHOME_STAT"
/

DROP TRIGGER "TIB_RLD_APPMOBILE"
/

DROP TRIGGER "TIB_RLD_PRODUCT_DETAILS"
/

DROP TRIGGER "TIB_RLD_PRODUCT_RECOMMEND"
/

DROP TRIGGER "TIB_RLD_TOP_SHUFFLING"
/

DROP TRIGGER "TIB_RLD_ZONE_CONTENT"
/

DROP TRIGGER "TIB_RLI_BANK"
/

DROP TRIGGER "TIB_RLI_INTERFACE"
/

DROP TRIGGER "TIB_RLM_ACCOUNT_AMOUNT"
/

DROP TRIGGER "TIB_RLM_BANK_CARD"
/

DROP TRIGGER "TIB_RLM_INTEGRAL_RECORDS"
/

DROP TRIGGER "TIB_RLM_INVITE"
/

DROP TRIGGER "TIB_RLM_MEMBER"
/

DROP TRIGGER "TIB_RLM_MEMBER_LOCK"
/

DROP TRIGGER "TIB_RLM_PRODUCT"
/

DROP TRIGGER "TIB_RLM_PROFIT_DETAILS"
/

DROP TRIGGER "TIB_RLM_SECURITY"
/

DROP TRIGGER "TIB_RLO_BANK_CHECKACCOUNT"
/

DROP TRIGGER "TIB_RLO_ORDER"
/

DROP TRIGGER "TIB_RLO_TRADE_MONEY"
/

DROP TRIGGER "TIB_RLP_DETAILS"
/

DROP TRIGGER "TIB_RLP_GROUP"
/

DROP TRIGGER "TIB_RLP_ISSUER"
/

DROP TRIGGER "TIB_RLP_ISSUER_PRODUCTS"
/

DROP TRIGGER "TIB_RLP_PRODUCT"
/

DROP TRIGGER "TIB_RLP_ATTR"
/

DROP TRIGGER "TIB_RLP_PRODUCT_BRAND"
/

DROP TRIGGER "TIB_RLP_PRODUCT_YIELDS"
/

DROP TRIGGER "TIB_RLS_TLOG"
/

DROP TRIGGER "TIB_RLS_USER"
/

DROP TRIGGER "TIB_RLT_PRODUCT"
/

DROP TRIGGER "TIB_RLT_TRANFER_TRADE"
/

ALTER TABLE "RLA_INTERFACECALLRECORD"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLA_INTERFACECALLRECORD" CASCADE CONSTRAINTS
/

ALTER TABLE "RLA_LOGINLOG"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLA_LOGINLOG" CASCADE CONSTRAINTS
/

ALTER TABLE "RLA_PRODUCT_ACCESS"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLA_PRODUCT_ACCESS" CASCADE CONSTRAINTS
/

DROP INDEX "IDX_TRACK_PRODUCT"
/

ALTER TABLE "RLA_PRODUCT_RECORD"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLA_PRODUCT_RECORD" CASCADE CONSTRAINTS
/

ALTER TABLE "RLA_SMSRECORD"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLA_SMSRECORD" CASCADE CONSTRAINTS
/

ALTER TABLE "RLB_ATTACHMENT"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLB_ATTACHMENT" CASCADE CONSTRAINTS
/

DROP INDEX "IDX_PARENT_DICT"
/

ALTER TABLE "RLB_DICT"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLB_DICT" CASCADE CONSTRAINTS
/

ALTER TABLE "RLB_HELP_CONENT"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLB_HELP_CONENT" CASCADE CONSTRAINTS
/

ALTER TABLE "RLB_HELP_NAV"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLB_HELP_NAV" CASCADE CONSTRAINTS
/

ALTER TABLE "RLB_HOTNEWS"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLB_HOTNEWS" CASCADE CONSTRAINTS
/

ALTER TABLE "RLB_INDEXPIC"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLB_INDEXPIC" CASCADE CONSTRAINTS
/

ALTER TABLE "RLB_MSGS"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLB_MSGS" CASCADE CONSTRAINTS
/

ALTER TABLE "RLB_NOTES"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLB_NOTES" CASCADE CONSTRAINTS
/

ALTER TABLE "RLB_NOTICE"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLB_NOTICE" CASCADE CONSTRAINTS
/

ALTER TABLE "RLB_RISK_CATEGORY"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLB_RISK_CATEGORY" CASCADE CONSTRAINTS
/

ALTER TABLE "RLB_RISK_MODEL"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLB_RISK_MODEL" CASCADE CONSTRAINTS
/

ALTER TABLE "RLB_RISK_OPTIONS"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLB_RISK_OPTIONS" CASCADE CONSTRAINTS
/

ALTER TABLE "RLB_RISK_PROBLEM"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLB_RISK_PROBLEM" CASCADE CONSTRAINTS
/

ALTER TABLE "RLB_STORY_SHARE"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLB_STORY_SHARE" CASCADE CONSTRAINTS
/

ALTER TABLE "RLB_VERSION"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLB_VERSION" CASCADE CONSTRAINTS
/

ALTER TABLE "RLD_ABOUT_US"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLD_ABOUT_US" CASCADE CONSTRAINTS
/

ALTER TABLE "RLD_APPHOME_STAT"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLD_APPHOME_STAT" CASCADE CONSTRAINTS
/

ALTER TABLE "RLD_APPMOBILE"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLD_APPMOBILE" CASCADE CONSTRAINTS
/

ALTER TABLE "RLD_BOARDS"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLD_BOARDS" CASCADE CONSTRAINTS
/

ALTER TABLE "RLD_PRODUCT_DETAILS"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLD_PRODUCT_DETAILS" CASCADE CONSTRAINTS
/

ALTER TABLE "RLD_PRODUCT_RECOMMEND"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLD_PRODUCT_RECOMMEND" CASCADE CONSTRAINTS
/

ALTER TABLE "RLD_TOP_SHUFFLING"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLD_TOP_SHUFFLING" CASCADE CONSTRAINTS
/

DROP INDEX "IDX_ZONE_CONTENT"
/

ALTER TABLE "RLD_ZONE_CONTENT"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLD_ZONE_CONTENT" CASCADE CONSTRAINTS
/

ALTER TABLE "RLI_BANK"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLI_BANK" CASCADE CONSTRAINTS
/

ALTER TABLE "RLI_INTERFACE"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLI_INTERFACE" CASCADE CONSTRAINTS
/

ALTER TABLE "RLM_ACCOUNT"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLM_ACCOUNT" CASCADE CONSTRAINTS
/

ALTER TABLE "RLM_ACCOUNT_AMOUNT"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLM_ACCOUNT_AMOUNT" CASCADE CONSTRAINTS
/

ALTER TABLE "RLM_BANK_CARD"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLM_BANK_CARD" CASCADE CONSTRAINTS
/

ALTER TABLE "RLM_IDENTITY"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLM_IDENTITY" CASCADE CONSTRAINTS
/

DROP INDEX "IDX_INTEGRAL_RECORD"
/

DROP TABLE "RLM_INTEGRAL_RECORDS" CASCADE CONSTRAINTS
/

ALTER TABLE "RLM_INVITE"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLM_INVITE" CASCADE CONSTRAINTS
/

DROP INDEX "RL_IDX_MEMBER_STATUS"
/

DROP INDEX "RL_IDX_MEMBER_NO"
/

ALTER TABLE "RLM_MEMBER"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLM_MEMBER" CASCADE CONSTRAINTS
/

DROP INDEX "IDX_LOCK_MEMBER"
/

ALTER TABLE "RLM_MEMBER_LOCK"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLM_MEMBER_LOCK" CASCADE CONSTRAINTS
/

DROP INDEX "IDX_MEMBER_PRODUCT"
/

ALTER TABLE "RLM_MEMBER_PRODUCT"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLM_MEMBER_PRODUCT" CASCADE CONSTRAINTS
/

ALTER TABLE "RLM_PROFIT_DETAILS"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLM_PROFIT_DETAILS" CASCADE CONSTRAINTS
/

ALTER TABLE "RLM_REDEEM_PRODUCT"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLM_REDEEM_PRODUCT" CASCADE CONSTRAINTS
/

DROP INDEX "IDX_MEMBER_RISKRECORD"
/

ALTER TABLE "RLM_RISK_RECORD"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLM_RISK_RECORD" CASCADE CONSTRAINTS
/

ALTER TABLE "RLM_SECURITY"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLM_SECURITY" CASCADE CONSTRAINTS
/

ALTER TABLE "RLO_ACCOUNT_AMOUNT"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLO_ACCOUNT_AMOUNT" CASCADE CONSTRAINTS
/

ALTER TABLE "RLO_CHECK_ACCOUNT"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLO_CHECK_ACCOUNT" CASCADE CONSTRAINTS
/

ALTER TABLE "RLO_CLEARING_TIMERULE"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLO_CLEARING_TIMERULE" CASCADE CONSTRAINTS
/

DROP INDEX "IDX_PRODUCT_ORDER"
/

DROP INDEX "IDX_MEMBER_ORDER"
/

ALTER TABLE "RLO_ORDER"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLO_ORDER" CASCADE CONSTRAINTS
/

ALTER TABLE "RLO_TRADE_MONEY"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLO_TRADE_MONEY" CASCADE CONSTRAINTS
/

ALTER TABLE "RLO_TRADE_RECONCILIATION"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLO_TRADE_RECONCILIATION" CASCADE CONSTRAINTS
/

ALTER TABLE "RLO_TRADEMONEY_RECORD"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLO_TRADEMONEY_RECORD" CASCADE CONSTRAINTS
/

ALTER TABLE "RLP_ACCEPT_ORG"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLP_ACCEPT_ORG" CASCADE CONSTRAINTS
/

ALTER TABLE "RLP_CLEARING_TIME"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLP_CLEARING_TIME" CASCADE CONSTRAINTS
/

ALTER TABLE "RLP_DETAILS"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLP_DETAILS" CASCADE CONSTRAINTS
/

ALTER TABLE "RLP_GROUP"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLP_GROUP" CASCADE CONSTRAINTS
/

ALTER TABLE "RLP_ISSUER"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLP_ISSUER" CASCADE CONSTRAINTS
/

ALTER TABLE "RLP_ISSUER_PRODUCTS"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLP_ISSUER_PRODUCTS" CASCADE CONSTRAINTS
/

DROP INDEX "IDX_ISSUER_PRODUCT"
/

DROP INDEX "IDX_PRODUCT_BRAND"
/

ALTER TABLE "RLP_PRODUCT"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLP_PRODUCT" CASCADE CONSTRAINTS
/

ALTER TABLE "RLP_PRODUCT_ATTR"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLP_PRODUCT_ATTR" CASCADE CONSTRAINTS
/

ALTER TABLE "RLP_PRODUCT_BRAND"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLP_PRODUCT_BRAND" CASCADE CONSTRAINTS
/

ALTER TABLE "RLP_PRODUCT_YIELDS"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLP_PRODUCT_YIELDS" CASCADE CONSTRAINTS
/

ALTER TABLE "RLP_PURCHASE_LIMIT"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLP_PURCHASE_LIMIT" CASCADE CONSTRAINTS
/

ALTER TABLE "RLS_ISMG"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLS_ISMG" CASCADE CONSTRAINTS
/

ALTER TABLE "RLS_MODULE"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLS_MODULE" CASCADE CONSTRAINTS
/

ALTER TABLE "RLS_POINTS"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLS_POINTS" CASCADE CONSTRAINTS
/

ALTER TABLE "RLS_RISK_RULE"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLS_RISK_RULE" CASCADE CONSTRAINTS
/

ALTER TABLE "RLS_ROLE"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLS_ROLE" CASCADE CONSTRAINTS
/

ALTER TABLE "RLS_ROLERIGHT"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLS_ROLERIGHT" CASCADE CONSTRAINTS
/

ALTER TABLE "RLS_SETTINGS"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLS_SETTINGS" CASCADE CONSTRAINTS
/

ALTER TABLE "RLS_TLOG"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLS_TLOG" CASCADE CONSTRAINTS
/

ALTER TABLE "RLS_USER"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLS_USER" CASCADE CONSTRAINTS
/

ALTER TABLE "RLT_PRODUCT"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLT_PRODUCT" CASCADE CONSTRAINTS
/

ALTER TABLE "RLT_TRANFER_MODE"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLT_TRANFER_MODE" CASCADE CONSTRAINTS
/

ALTER TABLE "RLT_TRANFER_TRADE"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLT_TRANFER_TRADE" CASCADE CONSTRAINTS
/

ALTER TABLE "RLT_TRANSFER_RULE"
DROP PRIMARY KEY CASCADE
/

DROP TABLE "RLT_TRANSFER_RULE" CASCADE CONSTRAINTS
/

DROP SEQUENCE SERIAL_MEMBER_CODE
/

DROP SEQUENCE SERIAL_ORDER_CODE
/

DROP SEQUENCE SERIAL_PRODUCT_CODE
/

DROP SEQUENCE S_RLB_INDEXPIC
/

DROP SEQUENCE S_RLM_INTEGRAL_RECORDS
/

DROP SEQUENCE S_RLM_PROFIT_DETAIL
/

DROP SEQUENCE S_RLO_ORDER
/

DROP SEQUENCE S_STORY_SHARE
/

DROP SEQUENCE "S_RLA_INTERFACECALLRECORD"
/

DROP SEQUENCE "S_RLA_LOGINLOG"
/

DROP SEQUENCE "S_RLA_SMSRECORD"
/

DROP SEQUENCE "S_RLB_ATTACHMENT"
/

DROP SEQUENCE "S_RLB_HOTNEWS"
/

DROP SEQUENCE "S_RLB_MSGS"
/

DROP SEQUENCE "S_RLB_NOTES"
/

DROP SEQUENCE "S_RLB_NOTICE"
/

DROP SEQUENCE "S_RLB_RISK_CATEGORY"
/

DROP SEQUENCE "S_RLB_RISK_MODEL"
/

DROP SEQUENCE "S_RLB_RISK_OPTIONS"
/

DROP SEQUENCE "S_RLB_RISK_PROBLEM"
/

DROP SEQUENCE "S_RLD_ABOUT_US"
/

DROP SEQUENCE "S_RLD_APPHOME_STAT"
/

DROP SEQUENCE "S_RLD_APPMOBILE"
/

DROP SEQUENCE "S_RLD_PRODUCT_DETAILS"
/

DROP SEQUENCE "S_RLD_PRODUCT_RECOMMEND"
/

DROP SEQUENCE "S_RLD_TOP_SHUFFLING"
/

DROP SEQUENCE "S_RLD_ZONE_CONTENT"
/

DROP SEQUENCE "S_RLI_BANK"
/

DROP SEQUENCE "S_RLI_INTERFACE"
/

DROP SEQUENCE "S_RLM_ACCOUNT_AMOUNT"
/

DROP SEQUENCE "S_RLM_BANK_CARD"
/

DROP SEQUENCE "S_RLM_COLLECTION"
/

DROP SEQUENCE "S_RLM_INVITE"
/

DROP SEQUENCE "S_RLM_MEMBER"
/

DROP SEQUENCE "S_RLM_MEMBER_LOCK"
/

DROP SEQUENCE "S_RLM_PRODUCT"
/

DROP SEQUENCE "S_RLM_PRODUCT_MONEY"
/

DROP SEQUENCE "S_RLM_SECURITY"
/

DROP SEQUENCE "S_RLO_CHECKACCOUNT"
/

DROP SEQUENCE "S_RLO_TRADE_MONEY"
/

DROP SEQUENCE "S_RLP_ATTR"
/

DROP SEQUENCE "S_RLP_DETAILS"
/

DROP SEQUENCE "S_RLP_GROUP"
/

DROP SEQUENCE "S_RLP_ISSUER"
/

DROP SEQUENCE "S_RLP_ISSUER_PRODUCTS"
/

DROP SEQUENCE "S_RLP_PRODUCT"
/

DROP SEQUENCE "S_RLP_PRODUCT_STAUTS_RECORD"
/

DROP SEQUENCE "S_RLP_PRODUCT_YIELDS"
/

DROP SEQUENCE "S_RLP_TRACK_RECORD"
/

DROP SEQUENCE "S_RLS_TLOG"
/

DROP SEQUENCE "S_RLS_USER"
/

DROP SEQUENCE "S_RLT_PRODUCT"
/

DROP SEQUENCE "S_RLT_TRANFER_TRADE"
/

DROP SEQUENCE "S_RLP_PRODUCT_BRAND"
/

CREATE SEQUENCE SERIAL_MEMBER_CODE
INCREMENT BY 1
START WITH 1
MAXVALUE 999999
MINVALUE 1
CYCLE
ORDER
/

CREATE SEQUENCE SERIAL_ORDER_CODE
INCREMENT BY 1
START WITH 1
MAXVALUE 9999
MINVALUE 1
CYCLE
ORDER
/

CREATE SEQUENCE SERIAL_PRODUCT_CODE
INCREMENT BY 1
START WITH 1
MAXVALUE 9999
MINVALUE 1
CYCLE
ORDER
/

CREATE SEQUENCE S_RLB_INDEXPIC
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE S_RLM_INTEGRAL_RECORDS
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE S_RLM_PROFIT_DETAIL
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE S_RLO_ORDER
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE S_STORY_SHARE
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLA_INTERFACECALLRECORD"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLA_LOGINLOG"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLA_SMSRECORD"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLB_ATTACHMENT"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLB_HOTNEWS"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLB_MSGS"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLB_NOTES"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLB_NOTICE"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLB_RISK_CATEGORY"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLB_RISK_MODEL"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLB_RISK_OPTIONS"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLB_RISK_PROBLEM"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLD_ABOUT_US"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
/

CREATE SEQUENCE "S_RLD_APPHOME_STAT"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLD_APPMOBILE"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLD_PRODUCT_DETAILS"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLD_PRODUCT_RECOMMEND"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLD_TOP_SHUFFLING"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLD_ZONE_CONTENT"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLI_BANK"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLI_INTERFACE"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLM_ACCOUNT_AMOUNT"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLM_BANK_CARD"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLM_COLLECTION"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLM_INVITE"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLM_MEMBER"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLM_MEMBER_LOCK"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLM_PRODUCT"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLM_PRODUCT_MONEY"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLM_SECURITY"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLO_CHECKACCOUNT"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLO_TRADE_MONEY"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLP_ATTR"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLP_DETAILS"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLP_GROUP"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLP_ISSUER"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLP_ISSUER_PRODUCTS"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLP_PRODUCT"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLP_PRODUCT_STAUTS_RECORD"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLP_PRODUCT_YIELDS"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLP_TRACK_RECORD"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLS_TLOG"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLS_USER"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLT_PRODUCT"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLT_TRANFER_TRADE"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

CREATE SEQUENCE "S_RLP_PRODUCT_BRAND"
INCREMENT BY 1
START WITH 1
NOMAXVALUE
MINVALUE 1
ORDER
/

/*==============================================================*/
/* Table: "RLA_INTERFACECALLRECORD"                             */
/*==============================================================*/
CREATE TABLE "RLA_INTERFACECALLRECORD"
(
  "ID"                 NUMBER(21)           NOT NULL,
  "NAME"               NVARCHAR2(120),
  "URL"                NVARCHAR2(220),
  "CALL_YEAR"          NUMBER(4)            DEFAULT 0 NOT NULL,
  "CALL_MONTH"         NUMBER(2)            DEFAULT 0 NOT NULL,
  "CALL_DAY"           NUMBER(2)            DEFAULT 0 NOT NULL,
  "CALL_TIME"          DATE,
  "PARAMS"             NVARCHAR2(2000),
  "RESPONSE"           NVARCHAR2(2000),
  "MODULE"             VARCHAR2(120),
  "ERROR"              NUMBER(1)            DEFAULT 0 NOT NULL,
  "EXP_TXT"            NVARCHAR2(2000),
  "RETRY"              CHAR(1)              DEFAULT 'N' NOT NULL,
  "RETR_ID"            NUMBER(21)           DEFAULT 0 NOT NULL,
  "MEMBER_CODE"        NVARCHAR2(32),
  "ORDER_ID"           NUMBER(21)           DEFAULT 0,
  "PLAYMONEY_ID"       NUMBER(21)           DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLA_INTERFACECALLRECORD"
ADD CONSTRAINT PK_RLA_INTERFACECALLRECORD PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLA_LOGINLOG"                                        */
/*==============================================================*/
CREATE TABLE "RLA_LOGINLOG"
(
  "ID"                 NUMBER(21)           NOT NULL,
  "USERNAME"           NVARCHAR2(30),
  "USER_ID"            NUMBER(18)           DEFAULT 0 NOT NULL,
  "IP"                 CHAR(16),
  "STATUS"             NUMBER(1)            DEFAULT 0 NOT NULL,
  "BROWER"             VARCHAR2(60),
  "SYS_FLAG"           CHAR(1)              DEFAULT 'N' NOT NULL,
  "LOGIN_TIME"         DATE,
  "LOGIN_YEAR"         NUMBER(4)            DEFAULT 2015 NOT NULL,
  "LOGIN_MONTH"        NUMBER(2)            DEFAULT 1 NOT NULL,
  "LOGIN_DAY"          NUMBER(2)            DEFAULT 1 NOT NULL,
  "INTEGRAL"           NUMBER(8)            DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLA_LOGINLOG"
ADD CONSTRAINT PK_RLA_LOGINLOG PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLA_PRODUCT_ACCESS"                                  */
/*==============================================================*/
CREATE TABLE "RLA_PRODUCT_ACCESS"
(
  "ID"                 VARCHAR(32)          NOT NULL,
  "PRODUCT"            NUMBER(12)           DEFAULT 0 NOT NULL,
  "ACCESS_TIME"        DATE,
  "ACCESS_TIME_YEAR"   NUMBER(4)            DEFAULT 0 NOT NULL,
  "ACCESS_TIME_MONTH"  NUMBER(2)            DEFAULT 0 NOT NULL,
  "ACCESS_TIME_DAY"    NUMBER(2)            DEFAULT 0 NOT NULL,
  "IP"                 NVARCHAR2(21),
  "MEMBER"             NUMBER(18)           DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLA_PRODUCT_ACCESS"
ADD CONSTRAINT PK_RLA_PRODUCT_ACCESS PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLA_PRODUCT_RECORD"                                  */
/*==============================================================*/
CREATE TABLE "RLA_PRODUCT_RECORD"
(
  "ID"                 NUMBER(21)           NOT NULL,
  "PRODUCT"            NUMBER(12),
  "INVESTOR"           NUMBER(18)           DEFAULT 0 NOT NULL,
  "INVESTOR_PHONE"     VARCHAR2(60),
  "INVESTOR_AMOUNT"    NUMERIC(24, 4),
  "INVESTOR_TIME_YEAR" NUMBER(4)            NOT NULL,
  "INVESTOR_TIME_MONTH" NUMBER(2)            NOT NULL,
  "INVESTOR_TIME_DAY"  NUMBER(2)            NOT NULL,
  "INVESTOR_TIME"      DATE,
  "INTEGRAL"           NUMBER(8)            DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLA_PRODUCT_RECORD"
ADD CONSTRAINT PK_RLA_PRODUCT_RECORD PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Index: "IDX_TRACK_PRODUCT"                                   */
/*==============================================================*/
CREATE INDEX "IDX_TRACK_PRODUCT" ON "RLA_PRODUCT_RECORD" (
  "PRODUCT" ASC
)
/

/*==============================================================*/
/* Table: "RLA_SMSRECORD"                                       */
/*==============================================================*/
CREATE TABLE "RLA_SMSRECORD"
(
  "ID"                 NUMBER(21)           NOT NULL,
  "SENDER"             NVARCHAR2(200),
  "PHONE"              VARCHAR2(20),
  "CONTENT"            NVARCHAR2(1200),
  "STATUS"             NUMBER(1)            DEFAULT 0,
  "CALL_YEAR"          NUMBER(4)            DEFAULT 2015,
  "CALL_MONTH"         NUMBER(2)            DEFAULT 1,
  "CALL_DAY"           NUMBER(2)            DEFAULT 1,
  "DATELINE"           DATE,
  "SEND_DATE"          DATE,
  "SENDID"             VARCHAR2(32),
  "INVALID"            NUMBER(6)            DEFAULT 0 NOT NULL,
  "SUCCESS"            NUMBER(6)            DEFAULT 0 NOT NULL,
  "BLACK"              NUMBER(6)            DEFAULT 0 NOT NULL,
  "MSG"                NVARCHAR2(200),
  "EXTNO"              NVARCHAR2(120),
  "RESPONSE"           NVARCHAR2(1200),
  "ERROR"              NUMBER(1)            DEFAULT 0 NOT NULL,
  "EXCEPTION_TXT"      NVARCHAR2(1200),
  "SOURCE"             VARCHAR2(60),
  "RETRY"              NUMBER(1)            DEFAULT 0 NOT NULL,
  "RETRY_ID"           NUMBER(21)           DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLA_SMSRECORD"
ADD CONSTRAINT PK_RLA_SMSRECORD PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLB_ATTACHMENT"                                      */
/*==============================================================*/
CREATE TABLE "RLB_ATTACHMENT"
(
  "ID"                 NUMBER(18)           NOT NULL,
  "FILE_NAME"          NVARCHAR2(100),
  "DATELINE"           DATE,
  "FILE_TYPE"          VARCHAR2(50),
  "FILE_SIZE"          NUMBER(8),
  "IMAGE"              NUMBER(1)            DEFAULT 0,
  "WIDTH"              NUMBER(6)            DEFAULT 0 NOT NULL,
  "HEIGHT"             NUMBER(6)            DEFAULT 0 NOT NULL,
  "USER_ID"            NUMBER(8)            DEFAULT 0 NOT NULL,
  "THUMB"              NUMBER(1)            DEFAULT 0 NOT NULL,
  "REMOTE"             NUMBER(1)            DEFAULT 0 NOT NULL,
  "FOLDER"             VARCHAR2(60),
  "PATH"               VARCHAR2(100),
  "MODE_TYPE"          VARCHAR2(30),
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL,
  "DOWNLOADS"          NUMBER(8)            DEFAULT 0 NOT NULL,
  "URL"                VARCHAR2(220)
)
/

ALTER TABLE "RLB_ATTACHMENT"
ADD CONSTRAINT PK_RLB_ATTACHMENT PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLB_DICT"                                            */
/*==============================================================*/
CREATE TABLE "RLB_DICT"
(
  "ID"                 VARCHAR(32)          NOT NULL,
  "PARENT"             VARCHAR(32)          DEFAULT '0' NOT NULL,
  "CODE"               VARCHAR2(20),
  "NAME"               NVARCHAR2(120),
  "CHINESE_NAME"       NVARCHAR2(120),
  "REMARK"             NVARCHAR2(255),
  "CHILDREN_FLAG"      CHAR(1)              DEFAULT 'N' NOT NULL,
  "LEVEL1_FLAG"        CHAR(1)              DEFAULT 'N' NOT NULL,
  "CREATE_TIME"        DATE,
  "SORT"               NUMBER(6)            DEFAULT 0 NOT NULL,
  "SYS_FLAG"           CHAR(1)              DEFAULT 'N' NOT NULL
)
/

ALTER TABLE "RLB_DICT"
ADD CONSTRAINT PK_RLB_DICT PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Index: "IDX_PARENT_DICT"                                     */
/*==============================================================*/
CREATE INDEX "IDX_PARENT_DICT" ON "RLB_DICT" (
  "PARENT" ASC
)
/

/*==============================================================*/
/* Table: "RLB_HELP_CONENT"                                     */
/*==============================================================*/
CREATE TABLE "RLB_HELP_CONENT"
(
  "ID"                 NVARCHAR2(64)        NOT NULL,
  "NAV"                NVARCHAR2(64),
  "TITLE"              NVARCHAR2(30),
  "CONENT"             CLOB,
  "SORT"               NUMBER(8)            DEFAULT 1 NOT NULL
)
/

ALTER TABLE "RLB_HELP_CONENT"
ADD CONSTRAINT PK_RLB_HELP_CONENT PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLB_HELP_NAV"                                        */
/*==============================================================*/
CREATE TABLE "RLB_HELP_NAV"
(
  "ID"                 NVARCHAR2(64)        NOT NULL,
  "TITLE"              NVARCHAR2(28),
  "ICON"               NVARCHAR2(18),
  "PARENT"             NVARCHAR2(64),
  "SORT"               NUMBER(4)            DEFAULT 1 NOT NULL
)
/

ALTER TABLE "RLB_HELP_NAV"
ADD CONSTRAINT PK_RLB_HELP_NAV PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLB_HOTNEWS"                                         */
/*==============================================================*/
CREATE TABLE "RLB_HOTNEWS"
(
  "ID"                 NUMBER(11)           NOT NULL,
  "TITLE"              NVARCHAR2(180),
  "PIC"                VARCHAR2(180),
  "PIC_ATTACHMENT"     NUMBER(18)           DEFAULT 0 NOT NULL,
  "CLICK_MODE"         VARCHAR2(20)         DEFAULT 'H5',
  "SUMMARY"            NVARCHAR2(200),
  "CONTENT"            CLOB,
  "TOP_FLAG"           CHAR(1)              DEFAULT 'N' NOT NULL,
  "TOP_PICS"           VARCHAR2(255),
  "TOP_ATTACHMENTS"    VARCHAR2(250),
  "PUBDATE"            DATE,
  "PUBLISHER"          VARCHAR2(120),
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL,
  "ATTACHMENTS"        VARCHAR2(120)
)
/

ALTER TABLE "RLB_HOTNEWS"
ADD CONSTRAINT PK_RLB_HOTNEWS PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLB_INDEXPIC"                                        */
/*==============================================================*/
CREATE TABLE "RLB_INDEXPIC"
(
  ID                   NUMBER(11)           NOT NULL,
  TITLE                NVARCHAR2(180),
  HREF_URL             NVARCHAR2(500),
  PIC                  NVARCHAR2(180),
  PIC_ATTACHMENT       NUMBER(18),
  SORT                 NUMBER(1)            DEFAULT 1,
  CREATE_TIME          DATE
)
/

ALTER TABLE "RLB_INDEXPIC"
ADD CONSTRAINT PK_RLB_INDEXPIC PRIMARY KEY (ID)
/

/*==============================================================*/
/* Table: "RLB_MSGS"                                            */
/*==============================================================*/
CREATE TABLE "RLB_MSGS"
(
  "ID"                 NUMBER(21)           NOT NULL,
  "USER_ID"            NUMBER(18)           DEFAULT 0 NOT NULL,
  "FRIEND_ID"          NUMBER(18)           DEFAULT 0 NOT NULL,
  "SENDER"             NUMBER(18)           DEFAULT 0 NOT NULL,
  "RECEIVER"           NUMBER(18)           DEFAULT 0 NOT NULL,
  "TYPE"               NUMBER(1)            DEFAULT 1 NOT NULL,
  "TITLE"              NVARCHAR2(120),
  "CONTENT"            CLOB,
  "PIC"                NVARCHAR2(180),
  "PIC_ATTACHMENT"     NUMBER(11),
  "SEND_TIME"          DATE,
  "READ_TIME"          DATE,
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL
)
/

ALTER TABLE "RLB_MSGS"
ADD CONSTRAINT PK_RLB_MSGS PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLB_NOTES"                                           */
/*==============================================================*/
CREATE TABLE "RLB_NOTES"
(
  "ID"                 NUMBER(6)            NOT NULL,
  "NAME"               NVARCHAR2(100),
  "CATEGORY"           NVARCHAR2(20),
  "NOTE"               CLOB,
  "CREATE_TIME"        DATE
)
/

ALTER TABLE "RLB_NOTES"
ADD CONSTRAINT PK_RLB_NOTES PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLB_NOTICE"                                          */
/*==============================================================*/
CREATE TABLE "RLB_NOTICE"
(
  "ID"                 NUMBER(11)           NOT NULL,
  "TITLE"              NVARCHAR2(180),
  "PIC"                NVARCHAR2(180),
  "CLICK_MODE"         NVARCHAR2(20)        DEFAULT 'H5',
  "PIC_ATTACHMENT"     NUMBER(18)           DEFAULT 0 NOT NULL,
  "SUMMARY"            NVARCHAR2(200),
  "CONTENT"            CLOB,
  "PUBDATE"            DATE,
  "PUBLISHER"          NVARCHAR2(120),
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL,
  "ATTACHMENTS"        NVARCHAR2(120)
)
/

ALTER TABLE "RLB_NOTICE"
ADD CONSTRAINT PK_RLB_NOTICE PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLB_RISK_CATEGORY"                                   */
/*==============================================================*/
CREATE TABLE "RLB_RISK_CATEGORY"
(
  "ID"                 NUMBER(6)            NOT NULL,
  "CODE"               NVARCHAR2(20),
  "NAME"               NVARCHAR2(120),
  "TOTAL_SCORE"        NUMBER(3)            DEFAULT 100 NOT NULL
)
/

ALTER TABLE "RLB_RISK_CATEGORY"
ADD CONSTRAINT PK_RLB_RISK_CATEGORY PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLB_RISK_MODEL"                                      */
/*==============================================================*/
CREATE TABLE "RLB_RISK_MODEL"
(
  "ID"                 NUMBER(6)            NOT NULL,
  "CATEGORY"           NUMBER(6)            DEFAULT 0 NOT NULL,
  "MIN_SCORE"          NUMBER(3)            DEFAULT 0 NOT NULL,
  "MAX_SCORE"          NUMBER(3)            DEFAULT 0 NOT NULL,
  "RISK_LEVEL"         VARCHAR2(20),
  "CREATE_TIME"        DATE
)
/

ALTER TABLE "RLB_RISK_MODEL"
ADD CONSTRAINT PK_RLB_RISK_MODEL PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLB_RISK_OPTIONS"                                    */
/*==============================================================*/
CREATE TABLE "RLB_RISK_OPTIONS"
(
  "ID"                 NUMBER(6)            NOT NULL,
  "PROBLEM"            NUMBER(6)            DEFAULT 0 NOT NULL,
  "CONTENT"            NVARCHAR2(180),
  "SCORE"              NUMBER(3)            DEFAULT 0 NOT NULL,
  "SORT"               NUMBER(6)            DEFAULT 1 NOT NULL
)
/

ALTER TABLE "RLB_RISK_OPTIONS"
ADD CONSTRAINT PK_RLB_RISK_OPTIONS PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLB_RISK_PROBLEM"                                    */
/*==============================================================*/
CREATE TABLE "RLB_RISK_PROBLEM"
(
  "ID"                 NUMBER(6)            NOT NULL,
  "TITLE"              NVARCHAR2(120),
  "OPTIONS"            VARCHAR2(255),
  "SORT"               NUMBER(6)            DEFAULT 0 NOT NULL,
  "CATEGORY"           NUMBER(6)            DEFAULT 0 NOT NULL,
  "CREATE_TIME"        DATE
)
/

ALTER TABLE "RLB_RISK_PROBLEM"
ADD CONSTRAINT PK_RLB_RISK_PROBLEM PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLB_STORY_SHARE"                                     */
/*==============================================================*/
CREATE TABLE "RLB_STORY_SHARE"
(
  "ID"                 NUMBER(11)           NOT NULL,
  "TITLE"              NVARCHAR2(180),
  "NAME"               NVARCHAR2(15),
  "PIC"                NVARCHAR2(180),
  "PIC_ATTACHMENT"     NUMBER(11),
  "CONTENT"            NVARCHAR2(1800),
  "CREATE_TIME"        DATE,
  "SORT"               NUMBER(1)            DEFAULT 1,
  "HREF_URL"           NVARCHAR2(200)
)
/

ALTER TABLE "RLB_STORY_SHARE"
ADD CONSTRAINT PK_RLB_STORY_SHARE PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLB_VERSION"                                         */
/*==============================================================*/
CREATE TABLE "RLB_VERSION"
(
  "ID"                 NVARCHAR2(64)        NOT NULL,
  "NAME"               NVARCHAR2(180),
  "CODE"               NVARCHAR2(20),
  "VERSION"            NUMERIC(14,4),
  "APP"                CHAR(1)              DEFAULT 'N' NOT NULL,
  "NEWS"               CHAR(1)              DEFAULT 'N' NOT NULL,
  "QRCODE"             NVARCHAR2(255),
  "QRCODE_ATTACHMENT"  NUMBER(18)           DEFAULT 0 NOT NULL,
  "PUBDATE"            DATE,
  "DOWNLOAD_URL"       NVARCHAR2(255),
  "DESCRIPTION"        NVARCHAR2(250),
  "CREATE_TIME"        DATE,
  "OPEN_REG"           CHAR(1)              DEFAULT 'Y' NOT NULL,
  "CONTACT"            NVARCHAR2(180)
)
/

ALTER TABLE "RLB_VERSION"
ADD CONSTRAINT PK_RLB_VERSION PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLD_ABOUT_US"                                        */
/*==============================================================*/
CREATE TABLE "RLD_ABOUT_US"
(
  ID                   NUMBER(18)           NOT NULL,
  "TYPE"               NUMBER(1),
  "TYPE_NAME"          NVARCHAR2(20),
  "TITLE"              NVARCHAR2(100),
  "CONTENT"            CLOB,
  "CREATE_TIME"        DATE                 DEFAULT SYSDATE,
  "SOURCE"             NVARCHAR2(100),
  "SORT"               NUMBER(1)            DEFAULT 0
)
/

ALTER TABLE "RLD_ABOUT_US"
ADD CONSTRAINT PK_RLD_ABOUT_US PRIMARY KEY (ID)
/

/*==============================================================*/
/* Table: "RLD_APPHOME_STAT"                                    */
/*==============================================================*/
CREATE TABLE "RLD_APPHOME_STAT"
(
  "ID"                 NUMBER(8)            NOT NULL,
  "TITLE"              NVARCHAR2(45),
  "TITLE_COLOR"        CHAR(7)              DEFAULT '#ffffff' NOT NULL,
  "STAT"               NVARCHAR2(20),
  "STAT_VAL"           NVARCHAR2(120),
  "TIP"                NVARCHAR2(120),
  "TIP_COLOR"          CHAR(7)              DEFAULT '#ffffff' NOT NULL,
  "STAT_DATE"          DATE,
  "STAT_TIME"          DATE,
  "SORT"               NUMBER(8)            DEFAULT 1 NOT NULL,
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL,
  "CREATE_TIME"        DATE
)
/

ALTER TABLE "RLD_APPHOME_STAT"
ADD CONSTRAINT PK_RLD_APPHOME_STAT PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLD_APPMOBILE"                                       */
/*==============================================================*/
CREATE TABLE "RLD_APPMOBILE"
(
  "ID"                 NUMBER(21)           NOT NULL,
  "MEMBER"             NUMBER(12)           DEFAULT 0 NOT NULL,
  "UUID"               NVARCHAR2(128),
  "FIRST_DATE"         DATE,
  "FIRST_TIME"         DATE,
  "CREATE_TIME"        DATE
)
/

ALTER TABLE "RLD_APPMOBILE"
ADD CONSTRAINT PK_RLD_APPMOBILE PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLD_BOARDS"                                          */
/*==============================================================*/
CREATE TABLE "RLD_BOARDS"
(
  "ID"                 VARCHAR(32)          NOT NULL,
  "MEMBER_ID"          NUMBER(18)           DEFAULT 0 NOT NULL,
  "PHONE"              CHAR(11),
  "NAME"               NVARCHAR2(50),
  "CONTENT"            CLOB,
  "COMMENT_TIME"       DATE,
  "IP"                 VARCHAR(100),
  "CREATE_TIME"        DATE
)
/

ALTER TABLE "RLD_BOARDS"
ADD CONSTRAINT PK_RLD_BOARDS PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLD_PRODUCT_DETAILS"                                 */
/*==============================================================*/
CREATE TABLE "RLD_PRODUCT_DETAILS"
(
  "ID"                 NUMBER(14)           NOT NULL,
  "PRODUCT"            NUMBER(12)           NOT NULL,
  "TITLE"              NVARCHAR2(20),
  "TITLE_COLOR"        CHAR(7)              DEFAULT '#ffffff' NOT NULL,
  "CONTENT"            NVARCHAR2(20),
  "CONTENT_COLOR"      CHAR(7)              DEFAULT '#ffffff' NOT NULL,
  "REMARK"             NVARCHAR2(60),
  "REMARK_COLOR"       CHAR(7)              DEFAULT '#ffffff' NOT NULL,
  "URL"                NVARCHAR2(120),
  "PCWEB_FLAG"         CHAR(1)              DEFAULT 'N' NOT NULL,
  "DISPLAY_ORDER"      NUMBER(1)            DEFAULT 1 NOT NULL
)
/

ALTER TABLE "RLD_PRODUCT_DETAILS"
ADD CONSTRAINT PK_RLD_PRODUCT_DETAILS PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLD_PRODUCT_RECOMMEND"                               */
/*==============================================================*/
CREATE TABLE "RLD_PRODUCT_RECOMMEND"
(
  "ID"                 NUMBER(12)           NOT NULL,
  "PRODUCT"            NUMBER(12)           DEFAULT 0 NOT NULL,
  "PRODUCT_NAME"       NVARCHAR2(120),
  "RECOMMEND_DATE"     DATE,
  "RECOMMEND_TIME"     DATE,
  "SORT"               NUMBER(12)           DEFAULT 1 NOT NULL,
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL,
  "TXT_TPL"            NVARCHAR2(120)
)
/

ALTER TABLE "RLD_PRODUCT_RECOMMEND"
ADD CONSTRAINT PK_RLD_PRODUCT_RECOMMEND PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLD_TOP_SHUFFLING"                                   */
/*==============================================================*/
CREATE TABLE "RLD_TOP_SHUFFLING"
(
  "ID"                 NUMBER(4)            NOT NULL,
  "PRODUCT"            NUMBER(12)           DEFAULT 0 NOT NULL,
  "SECTION"            NUMBER(1)            DEFAULT 1 NOT NULL,
  "SORT"               NUMBER(4)            DEFAULT 0 NOT NULL,
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL,
  "IMG_ATTACHMENT"     NUMBER(18)           DEFAULT 0 NOT NULL,
  "IMG"                NVARCHAR2(255),
  "CLICK_MODE"         NVARCHAR2(20)        DEFAULT 'H5',
  "CLICK_URL"          NVARCHAR2(255),
  "CREATE_TIME"        DATE
)
/

ALTER TABLE "RLD_TOP_SHUFFLING"
ADD CONSTRAINT PK_RLD_TOP_SHUFFLING PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLD_ZONE_CONTENT"                                    */
/*==============================================================*/
CREATE TABLE "RLD_ZONE_CONTENT"
(
  "ID"                 NUMBER(8)            NOT NULL,
  "PRODUCT"            NUMBER(12)           DEFAULT 0 NOT NULL,
  "ZONE"               NUMBER(8)            DEFAULT 0 NOT NULL,
  "IMAGE_URL"          NVARCHAR2(180),
  "IMAGE_HEIGHT"       NUMBER(5)            DEFAULT 0 NOT NULL,
  "IMAGE_WIDTH"        NUMBER(5)            DEFAULT 0 NOT NULL,
  "IMAGE_ATTACHMENT"   NUMBER(18)           DEFAULT 0 NOT NULL,
  "IMAGE_WIDTH_SCALE"  NUMBER(3)            DEFAULT 100 NOT NULL,
  "ROW_INDEX"          NUMBER(2)            DEFAULT 1 NOT NULL,
  "ENABLE_FLAG"        CHAR(1)              DEFAULT 'N',
  "UPLOAD_TIME"        DATE,
  "DISPLAY_ORDER"      NUMBER(8)            DEFAULT 1 NOT NULL
)
/

ALTER TABLE "RLD_ZONE_CONTENT"
ADD CONSTRAINT PK_RLD_ZONE_CONTENT PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Index: "IDX_ZONE_CONTENT"                                    */
/*==============================================================*/
CREATE INDEX "IDX_ZONE_CONTENT" ON "RLD_ZONE_CONTENT" (
  "ZONE" ASC
)
/

/*==============================================================*/
/* Table: "RLI_BANK"                                            */
/*==============================================================*/
CREATE TABLE "RLI_BANK"
(
  "ID"                 NUMBER(6)            NOT NULL,
  "NAME"               NVARCHAR2(120),
  "LOGO"               VARCHAR2(250),
  "LOGO_ATTACHMENT"    NUMBER(18)           DEFAULT 0 NOT NULL,
  "INTRO"              NVARCHAR2(1800),
  "ENABLE_FLAG"        CHAR(1)              DEFAULT 'Y' NOT NULL,
  "CREATE_TIME"        DATE
)
/

ALTER TABLE "RLI_BANK"
ADD CONSTRAINT PK_RLI_BANK PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLI_INTERFACE"                                       */
/*==============================================================*/
CREATE TABLE "RLI_INTERFACE"
(
  "ID"                 NUMBER(8)            NOT NULL,
  "BANK"               NUMBER(6)            DEFAULT 0 NOT NULL,
  "NAME"               NVARCHAR2(120),
  "URL"                VARCHAR2(180),
  "PORT"               NUMBER(8),
  "DESCRIPTION"        NVARCHAR2(255),
  "SERIAL_OBJECT"      VARCHAR2(20),
  "RETURN_STRUCT"      NVARCHAR2(480),
  "REQUEST_PARAMS"     NVARCHAR2(480),
  "REQUEST_TYPE"       VARCHAR2(10),
  "CALL_SIZE"          NUMBER(8)            DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLI_INTERFACE"
ADD CONSTRAINT PK_RLI_INTERFACE PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLM_ACCOUNT"                                         */
/*==============================================================*/
CREATE TABLE "RLM_ACCOUNT"
(
  "MEMBER"             NUMBER(18)           NOT NULL,
  "INTEGRAL"           NUMBER(8)            DEFAULT 0 NOT NULL,
  "ELECTRONIC_ACCOUNT" VARCHAR2(180),
  "TRADE_PWD"          VARCHAR2(64),
  "TRADE_PWD_SALT"     CHAR(16),
  "AMOUNT"             NUMERIC(24, 4)       DEFAULT 0.0000 NOT NULL,
  "INVESTMENTS"        NUMERIC(24, 4)       DEFAULT 0.0000 NOT NULL,
  "AVAILABLE"          NUMERIC(24, 4)       DEFAULT 0.0000 NOT NULL,
  "FREEZE"             NUMERIC(24, 4)       DEFAULT 0.0000 NOT NULL,
  "INCOME"             NUMERIC(24, 4)       DEFAULT 0,
  "NO_INCOME"          NUMERIC(24, 4)       DEFAULT 0,
  "OK_INCOME"          NUMERIC(24, 4)       DEFAULT 0,
  "INVITES"            NUMBER(6)            DEFAULT 0 NOT NULL,
  "INVITE_INTEGRAL"    NUMBER(8)            DEFAULT 0 NOT NULL,
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL
)
/

ALTER TABLE "RLM_ACCOUNT"
ADD CONSTRAINT PK_RLM_ACCOUNT PRIMARY KEY ("MEMBER")
/

/*==============================================================*/
/* Table: "RLM_ACCOUNT_AMOUNT"                                  */
/*==============================================================*/
CREATE TABLE "RLM_ACCOUNT_AMOUNT"
(
  "ID"                 NUMBER(21)           NOT NULL,
  "MEMBER"             NUMBER(12)           DEFAULT 0 NOT NULL,
  "NAME"               VARCHAR2(120),
  "RECORD_YEAR"        NUMBER(4)            DEFAULT 2015 NOT NULL,
  "RECORD_MONTH"       NUMBER(2)            DEFAULT 1 NOT NULL,
  "RECORD_DAY"         NUMBER(2)            DEFAULT 1 NOT NULL,
  "RECORD_TIME"        DATE,
  "TYPE"               VARCHAR2(20),
  "EARNING"            NUMERIC(24, 4)       DEFAULT 0.0 NOT NULL,
  "EXPENSE"            NUMERIC(24, 4)       DEFAULT 0.0 NOT NULL,
  "BALANCE"            NUMERIC(24, 4)       DEFAULT 0.0 NOT NULL,
  "PAY_TYPE"           VARCHAR2(120),
  "REMARK"             NVARCHAR2(300),
  "CREATE_TIME"        DATE
)
/

ALTER TABLE "RLM_ACCOUNT_AMOUNT"
ADD CONSTRAINT PK_RLM_ACCOUNT_AMOUNT PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLM_BANK_CARD"                                       */
/*==============================================================*/
CREATE TABLE "RLM_BANK_CARD"
(
  "ID"                 NUMBER(20)           NOT NULL,
  "MEMBER"             NUMBER(18)           DEFAULT 0 NOT NULL,
  "BANK"               VARCHAR2(20),
  "BANK_CARD"          VARCHAR2(80),
  "CARDHOLDER"         VARCHAR2(200),
  "CARD_TYPE"          VARCHAR2(120),
  "VERIFY_AMOUNT"      NUMERIC(10, 2)       DEFAULT 0.00 NOT NULL,
  "BIND_TIME"          DATE,
  "AUDIT_STATUS"       NUMBER(1)            DEFAULT 0 NOT NULL,
  "AUDIT_TIME"         DATE,
  "AUDIT_USER"         VARCHAR2(60)
)
/

ALTER TABLE "RLM_BANK_CARD"
ADD CONSTRAINT PK_RLM_BANK_CARD PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLM_IDENTITY"                                        */
/*==============================================================*/
CREATE TABLE "RLM_IDENTITY"
(
  "MEMBER"             NUMBER(18)           NOT NULL,
  "ID_CARD"            VARCHAR2(18),
  "REAL_NAME"          NVARCHAR2(28),
  "STATUS"             NUMBER(1)            DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLM_IDENTITY"
ADD CONSTRAINT PK_RLM_IDENTITY PRIMARY KEY ("MEMBER")
/

/*==============================================================*/
/* Table: "RLM_INTEGRAL_RECORDS"                                */
/*==============================================================*/
CREATE TABLE "RLM_INTEGRAL_RECORDS"
(
  "ID"                 NUMBER(6),
  "MEMBER"             NUMBER(18),
  "RECORD_YEAR"        NUMBER(4)            DEFAULT 2015 NOT NULL,
  "RECORD_MONTH"       NUMBER(2)            DEFAULT 1 NOT NULL,
  "RECORD_DAY"         NUMBER(2)            DEFAULT 1 NOT NULL,
  "RECORD_TIME"        DATE,
  "TYPE"               NVARCHAR2(120),
  "EARNING"            NUMBER(16)           DEFAULT 0 NOT NULL,
  "EXPENSE"            NUMBER(16)           DEFAULT 0 NOT NULL,
  "BALANCE"            NUMBER(16)           DEFAULT 0 NOT NULL,
  "REMARK"             NVARCHAR2(1200),
  "CREATE_TIME"        DATE
)
/

/*==============================================================*/
/* Index: "IDX_INTEGRAL_RECORD"                                 */
/*==============================================================*/
CREATE INDEX "IDX_INTEGRAL_RECORD" ON "RLM_INTEGRAL_RECORDS" (
  "MEMBER" ASC
)
/

/*==============================================================*/
/* Table: "RLM_INVITE"                                          */
/*==============================================================*/
CREATE TABLE "RLM_INVITE"
(
  "ID"                 NUMBER(21)           NOT NULL,
  "MEMBER"             NUMBER(18)           DEFAULT 0 NOT NULL,
  "PHONE"              VARCHAR2(18),
  "ACCEPT"             NUMBER(1)            DEFAULT 0 NOT NULL,
  "INTEGRAL"           NUMBER(8)            DEFAULT 0 NOT NULL,
  "INVITE_TIME"        DATE,
  "ACCEPT_TIME"        DATE,
  "NEW_MEMBER"         NUMBER(18)           DEFAULT 0 NOT NULL,
  "REG_TIME"           DATE,
  "REG_TIME_YEAR"      NUMBER(4)            DEFAULT 2015 NOT NULL,
  "REG_TIME_MONTH"     NUMBER(2)            DEFAULT 1 NOT NULL,
  "REG_TIME_DAY"       NUMBER(2)            DEFAULT 1 NOT NULL
)
/

ALTER TABLE "RLM_INVITE"
ADD CONSTRAINT PK_RLM_INVITE PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLM_MEMBER"                                          */
/*==============================================================*/
CREATE TABLE "RLM_MEMBER"
(
  "ID"                 NUMBER(18)           NOT NULL,
  "CODE"               CHAR(19),
  "PHONE"              VARCHAR2(18),
  "REAL_NAME"          NVARCHAR2(40),
  "NICK_NAME"          NVARCHAR2(60),
  "GENDER"             NUMBER(1)            DEFAULT 1 NOT NULL,
  "AVATAR"             VARCHAR2(250),
  "EMAIL"              VARCHAR2(200),
  "TYPE"               NUMBER(1)            DEFAULT 1 NOT NULL,
  "QQ"                 VARCHAR(18),
  "WXCHAT"             VARCHAR(120),
  "CART_TYPE"          NUMBER(1)            DEFAULT 1 NOT NULL,
  "CART_NO"            VARCHAR2(180),
  "INVITEMOBILE"       VARCHAR2(18),
  "BIRTHDAY"           DATE,
  "APPROVE"            CHAR(1)              DEFAULT 'N' NOT NULL,
  "ELECTRONIC_ACCOUNT" VARCHAR2(180),
  "GRADE"              NUMBER(1)            DEFAULT 0 NOT NULL,
  "SECURITY"           CHAR(1)              DEFAULT 'N' NOT NULL,
  "RISK_TOLERANCE"     NUMBER(1)            DEFAULT 0 NOT NULL,
  "AVG_YIELD"          NUMBER(5,2)          DEFAULT 0,
  "PASSWORD"           VARCHAR2(64),
  "SALT"               CHAR(16),
  "BIND_BANK_CARD"     CHAR(1)              DEFAULT 'N' NOT NULL,
  "SUB_FLAG"           CHAR(1)              DEFAULT 'N' NOT NULL,
  "TRADE_PASSWORD_FLAG" CHAR(1)              DEFAULT 'N' NOT NULL,
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL,
  "REGIEST_TIME"       DATE,
  "REGIEST_IP"         CHAR(16),
  "LAST_LOGIN_TIME"    DATE,
  "LAST_LOGIN_IP"      CHAR(16),
  "NATION"             NVARCHAR2(160),
  "PROVINCE"           NVARCHAR2(120),
  "CITY"               NVARCHAR2(120),
  "COUNTY"             NVARCHAR2(120),
  "ADDRESS"            NVARCHAR2(255),
  "CREATE_TIME"        DATE
)
/

ALTER TABLE "RLM_MEMBER"
ADD CONSTRAINT PK_RLM_MEMBER PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Index: "RL_IDX_MEMBER_NO"                                    */
/*==============================================================*/
CREATE INDEX "RL_IDX_MEMBER_NO" ON "RLM_MEMBER" (
  "CODE" ASC
)
/

/*==============================================================*/
/* Index: "RL_IDX_MEMBER_STATUS"                                */
/*==============================================================*/
CREATE INDEX "RL_IDX_MEMBER_STATUS" ON "RLM_MEMBER" (
  "STATUS" ASC
)
/

/*==============================================================*/
/* Table: "RLM_MEMBER_LOCK"                                     */
/*==============================================================*/
CREATE TABLE "RLM_MEMBER_LOCK"
(
  "ID"                 NUMBER(6)            NOT NULL,
  "MEMBER"             NUMBER(18),
  "IP"                 CHAR(16),
  "LOCK_TIME"          DATE,
  "UNLOCK_TIME"        DATE
)
/

ALTER TABLE "RLM_MEMBER_LOCK"
ADD CONSTRAINT PK_RLM_MEMBER_LOCK PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Index: "IDX_LOCK_MEMBER"                                     */
/*==============================================================*/
CREATE INDEX "IDX_LOCK_MEMBER" ON "RLM_MEMBER_LOCK" (
  "MEMBER" ASC
)
/

/*==============================================================*/
/* Table: "RLM_MEMBER_PRODUCT"                                  */
/*==============================================================*/
CREATE TABLE "RLM_MEMBER_PRODUCT"
(
  "ID"                 NUMBER(21)           NOT NULL,
  "MEMBER"             NUMBER(18)           DEFAULT 0 NOT NULL,
  "PRODUCT"            NUMBER(12)           DEFAULT 0 NOT NULL,
  "TRANSFER_PRODUCT"   NUMBER(18)           DEFAULT 0 NOT NULL,
  "TRANSFER_PRICE"     NUMERIC(24, 4)       DEFAULT 0 NOT NULL,
  "ORDER_ID"           NUMBER(18)           DEFAULT 0 NOT NULL,
  "AMOUNT"             NUMERIC(24, 4)       DEFAULT 0.0000 NOT NULL,
  "BUY_TIME"           DATE,
  "BUY_TIME_YEAR"      NUMBER(4)            DEFAULT 2015 NOT NULL,
  "BUY_TIME_MONTH"     NUMBER(2)            DEFAULT 1 NOT NULL,
  "BUY_TIME_DAY"       NUMBER(2)            DEFAULT 1 NOT NULL,
  "COLLECTION_MODE"    VARCHAR2(20),
  "TERM"               NUMBER(8)            NOT NULL,
  "YIELD"              NUMERIC(5,2)         DEFAULT 0 NOT NULL,
  "PROFIT"             NUMERIC(24,4)        DEFAULT 0 NOT NULL,
  "RESIDUAL_INCOME"    NUMERIC(24,4)        DEFAULT 0 NOT NULL,
  "BANK_CARD"          VARCHAR2(19),
  "HOLD_DAYS"          NUMBER(8)            DEFAULT 0 NOT NULL,
  "VALUEDATE"          DATE,
  "VALUEDATE_YEAR"     NUMBER(4)            DEFAULT 1997 NOT NULL,
  "VALUEDATE_MONTH"    NUMBER(2)            DEFAULT 1 NOT NULL,
  "VALUEDATE_DAY"      NUMBER(2)            DEFAULT 1 NOT NULL,
  "DUE_TIME"           DATE,
  "DUE_TIME_YEAR"      NUMBER(4)            DEFAULT 1997,
  "DUE_TIME_MONTH"     NUMBER(2)            DEFAULT 1 NOT NULL,
  "DUE_TIME_DAY"       NUMBER(2)            DEFAULT 1 NOT NULL,
  "PRODUCT_STATUS"     NUMBER(1)            DEFAULT 0 NOT NULL,
  "REDEEM_STATUS"      NUMBER(1)            DEFAULT 0 NOT NULL,
  "TRANSFER_STATUS"    NUMBER(1)            DEFAULT 0 NOT NULL,
  "PLAYMONEY_STATUS"   NUMBER(1)            DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLM_MEMBER_PRODUCT"
ADD CONSTRAINT PK_RLM_MEMBER_PRODUCT PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Index: "IDX_MEMBER_PRODUCT"                                  */
/*==============================================================*/
CREATE INDEX "IDX_MEMBER_PRODUCT" ON "RLM_MEMBER_PRODUCT" (
  "MEMBER" ASC,
  "PRODUCT" ASC
)
/

/*==============================================================*/
/* Table: "RLM_PROFIT_DETAILS"                                  */
/*==============================================================*/
CREATE TABLE "RLM_PROFIT_DETAILS"
(
  "ID"                 NUMBER(18)           NOT NULL,
  "MEMBER"             NUMBER(18)           DEFAULT 0 NOT NULL,
  "PRODUCT"            NUMBER(12)           DEFAULT 0 NOT NULL,
  "MEMBER_PRODUCT"     NUMBER(18)           DEFAULT 0 NOT NULL,
  "PROFIT"             NUMERIC(24,4)        DEFAULT 0 NOT NULL,
  "PRINCIPAL"          NUMERIC(24,4)        DEFAULT 0 NOT NULL,
  "INTERST"            NUMERIC(24,4)        DEFAULT 0 NOT NULL,
  "ISSUE"              NUMBER(3)            DEFAULT 0 NOT NULL,
  "PROFIT_TIME"        DATE,
  "PROFIT_TIME_YEAR"   NUMBER(4)            DEFAULT 2015 NOT NULL,
  "PROFIT_TIME_MONTH"  NUMBER(2)            DEFAULT 01 NOT NULL,
  "PROFIT_TIME_DAY"    NUMBER(2)            DEFAULT 01 NOT NULL,
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL,
  "PLAY_MONEY"         NUMBER(21)           DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLM_PROFIT_DETAILS"
ADD CONSTRAINT PK_RLM_PROFIT_DETAILS PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLM_REDEEM_PRODUCT"                                  */
/*==============================================================*/
CREATE TABLE "RLM_REDEEM_PRODUCT"
(
  "MEMBER"             NUMBER(18)           NOT NULL,
  "MEMBER_PRODUCT"     NUMBER(20)           DEFAULT 0 NOT NULL,
  "PRODUCT"            NUMBER(12)           DEFAULT 0 NOT NULL,
  "PRODUCT_NAME"       NVARCHAR2(180),
  "PRODUCT_CODE"       CHAR(16),
  "REDEEM_TIME"        DATE,
  "PHONE"              CHAR(11),
  "AMOUNT"             NUMERIC(24, 4)       DEFAULT 0 NOT NULL,
  "REDEEM_TIME_YEAR"   NUMBER(4)            DEFAULT 0 NOT NULL,
  "REDEEM_TIME_MONTH"  NUMBER(2)            DEFAULT 0 NOT NULL,
  "REDEEM_TIME_DAY"    NUMBER(2)            DEFAULT 0 NOT NULL,
  "STATUS"             NUMBER(1)            DEFAULT 0 NOT NULL,
  "ORDER_ID"           NUMBER(21)           DEFAULT 0 NOT NULL,
  "CREATE_TIME"        DATE
)
/

ALTER TABLE "RLM_REDEEM_PRODUCT"
ADD CONSTRAINT PK_RLM_REDEEM_PRODUCT PRIMARY KEY ("MEMBER", "MEMBER_PRODUCT")
/

/*==============================================================*/
/* Table: "RLM_RISK_RECORD"                                     */
/*==============================================================*/
CREATE TABLE "RLM_RISK_RECORD"
(
  "ID"                 VARCHAR(32)          NOT NULL,
  "MEMBER"             NUMBER(18),
  "RISK_LEVEL"         NUMBER(1),
  "RECORD_TIME"        DATE,
  "QA_JSON"            CLOB,
  "SCORE"              NUMBER(3)            DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLM_RISK_RECORD"
ADD CONSTRAINT PK_RLM_RISK_RECORD PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Index: "IDX_MEMBER_RISKRECORD"                               */
/*==============================================================*/
CREATE INDEX "IDX_MEMBER_RISKRECORD" ON "RLM_RISK_RECORD" (
  "MEMBER" ASC
)
/

/*==============================================================*/
/* Table: "RLM_SECURITY"                                        */
/*==============================================================*/
CREATE TABLE "RLM_SECURITY"
(
  "ID"                 NUMBER(18)           NOT NULL,
  "MEMBER"             NUMBER(18)           DEFAULT 0 NOT NULL,
  "SECURITY_PROBLEM"   NVARCHAR2(20),
  "SECURITY_PROBLEM_DISPLAY" NVARCHAR2(200),
  "SECURITY_ANSWER"    NVARCHAR2(200),
  "SECURITY_ORDER"     NUMBER(6)            DEFAULT 1 NOT NULL
)
/

ALTER TABLE "RLM_SECURITY"
ADD CONSTRAINT PK_RLM_SECURITY PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLO_ACCOUNT_AMOUNT"                                  */
/*==============================================================*/
CREATE TABLE "RLO_ACCOUNT_AMOUNT"
(
  "ID"                 VARCHAR(32)          NOT NULL,
  "DAY"                DATE,
  "BALANCE"            NUMERIC(24,2)        DEFAULT 0 NOT NULL,
  "AVAILABLE"          NUMERIC(24,2)        DEFAULT 0 NOT NULL,
  "FREEZE"             NUMERIC(24,2)        DEFAULT 0 NOT NULL,
  "LAST_DAY"           NUMERIC(24,2)        DEFAULT 0 NOT NULL,
  "ACCOUNT"            VARCHAR2(36)
)
/

ALTER TABLE "RLO_ACCOUNT_AMOUNT"
ADD CONSTRAINT PK_RLO_ACCOUNT_AMOUNT PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLO_CHECK_ACCOUNT"                                   */
/*==============================================================*/
CREATE TABLE "RLO_CHECK_ACCOUNT"
(
  "ID"                 NUMBER(21)           NOT NULL,
  "TRANSDATE"          CHAR(8),
  "REQBIZDATE"         CHAR(8),
  "OUTERORDERNO"       NVARCHAR2(32),
  "ORDERSTATUS"        NUMBER(1),
  "INNERORDERNO"       NVARCHAR2(32),
  "ORDERTYPE"          NUMBER(1),
  "AMOUNT"             NUMERIC(16,2)        DEFAULT 0,
  "OUTERORDERSTATUS"   NUMBER(1)            DEFAULT 0,
  "OUTERORDERAMOUNT"   NUMERIC(24,2)        DEFAULT 0,
  "FEE"                NUMBER(16,2),
  "CURRENCY"           NVARCHAR2(12),
  "CHECK_TIME"         DATE,
  "EXP_FLAG"           CHAR(1)              DEFAULT 'N' NOT NULL,
  "CATEGORY"           NVARCHAR2(120),
  "OUTCOME"            NUMBER(1)            DEFAULT 0
)
/

ALTER TABLE "RLO_CHECK_ACCOUNT"
ADD CONSTRAINT PK_RLO_CHECK_ACCOUNT PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLO_CLEARING_TIMERULE"                               */
/*==============================================================*/
CREATE TABLE "RLO_CLEARING_TIMERULE"
(
  "ID"                 NVARCHAR2(6)         NOT NULL,
  "PRODUCT_TYPE"       NUMBER(1),
  "CLEARING_TIME"      NUMBER(2),
  "CLEARING_CYCLE"     NUMBER(1),
  "CLEARING_DAY"       NUMBER(6)
)
/

ALTER TABLE "RLO_CLEARING_TIMERULE"
ADD CONSTRAINT PK_RLO_CLEARING_TIMERULE PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLO_ORDER"                                           */
/*==============================================================*/
CREATE TABLE "RLO_ORDER"
(
  "ID"                 NUMBER(18)           NOT NULL,
  "TRADE_NO"           CHAR(24),
  "TRANSFER_PRODUCT"   NUMBER(12)           DEFAULT 0 NOT NULL,
  "PRODUCT"            NUMBER(12)           DEFAULT 0 NOT NULL,
  "TYPE"               NUMBER(1)            DEFAULT 1 NOT NULL,
  "PRODUCT_NAME"       NVARCHAR2(220),
  "PRODUCT_NO"         CHAR(16)             NOT NULL,
  "PROMOTION_RULE"     NUMBER(4)            DEFAULT 0 NOT NULL,
  "MEMBER"             NUMBER(18)           DEFAULT 0 NOT NULL,
  "BUG_BANK_CARD"      NVARCHAR2(18),
  "BUY_TIME_YEAR"      NUMBER(4)            DEFAULT 2015 NOT NULL,
  "BUY_TIME_MONTH"     NUMBER(2)            DEFAULT 01 NOT NULL,
  "BUY_TIME_DAY"       NUMBER(2)            DEFAULT 01 NOT NULL,
  "BUY_TIME"           DATE,
  "PAY_TYPE"           NUMBER(1)            DEFAULT 1 NOT NULL,
  "PEER_ACCOUNT"       NVARCHAR2(120),
  "ORDER_TYPE"         CHAR(3)              DEFAULT 'BUY' NOT NULL,
  "TRADE_AMOUNT"       NUMERIC(24, 4)       DEFAULT 0.0 NOT NULL,
  "FEE_AMONUT"         NUMERIC(24, 4)       DEFAULT 0.0 NOT NULL,
  "LODGING_AMOUNT"     NUMERIC(24,4)        DEFAULT 0.0 NOT NULL,
  "CONFIRM_DATE"       DATE,
  "RECORD_TIME"        DATE,
  "CREATE_TIME"        DATE,
  "REFERER"            VARCHAR2(255),
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL,
  "INTERFACE_RECORD"   NUMBER(21)           DEFAULT 0 NOT NULL,
  "REMARK"             NVARCHAR2(1000)
)
/

ALTER TABLE "RLO_ORDER"
ADD CONSTRAINT PK_RLO_ORDER PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Index: "IDX_MEMBER_ORDER"                                    */
/*==============================================================*/
CREATE INDEX "IDX_MEMBER_ORDER" ON "RLO_ORDER" (
  "MEMBER" ASC
)
/

/*==============================================================*/
/* Index: "IDX_PRODUCT_ORDER"                                   */
/*==============================================================*/
CREATE INDEX "IDX_PRODUCT_ORDER" ON "RLO_ORDER" (
  "PRODUCT" ASC
)
/

/*==============================================================*/
/* Table: "RLO_TRADE_MONEY"                                     */
/*==============================================================*/
CREATE TABLE "RLO_TRADE_MONEY"
(
  "ID"                 NUMBER(22)           NOT NULL,
  "ORDER_ID"           NUMBER(18)           DEFAULT 0 NOT NULL,
  "MEMBER"             NUMBER(18)           DEFAULT 0 NOT NULL,
  "MEMBER_CODE"        VARCHAR(19),
  "MEMBER_PRODUCT"     NUMBER(18)           DEFAULT 0 NOT NULL,
  "PRODUCT"            NUMBER(12)           DEFAULT 0 NOT NULL,
  "PRINCIPAL"          NUMERIC(24, 4)       DEFAULT 0 NOT NULL,
  "PROFIT"             NUMERIC(24, 4)       DEFAULT 0 NOT NULL,
  "AMOUNT"             NUMERIC(24, 4)       DEFAULT 0 NOT NULL,
  "FEES"               NUMERIC(24, 4)       DEFAULT 0 NOT NULL,
  "LODGING_FEE"        NUMERIC(24, 4)       DEFAULT 0 NOT NULL,
  "TYPE"               NUMBER(1)            DEFAULT 1 NOT NULL,
  "MONEY_TIME"         DATE,
  "MONEY_TIME_YEAR"    NUMBER(4)            DEFAULT 0 NOT NULL,
  "MONEY_TIME_MONTH"   NUMBER(2)            DEFAULT 0 NOT NULL,
  "MONEY_TIME_DAY"     NUMBER(2)            DEFAULT 0 NOT NULL,
  "SUBMIT_TIME"        DATE,
  "SUBMIT_TIME_YEAR"   NUMBER(4)            DEFAULT 0 NOT NULL,
  "SUBMIT_TIME_MONTH"  NUMBER(2)            DEFAULT 0 NOT NULL,
  "SUBMIT_TIME_DAY"    NUMBER(2)            DEFAULT 0 NOT NULL,
  "FAIL_NOTES"         NVARCHAR2(1500),
  "STATUS"             NUMBER(1)            DEFAULT 0 NOT NULL,
  "ADJUST_AMOUNT"      NUMERIC(24,4)        DEFAULT 0 NOT NULL,
  "ADJUST_MODE"        NUMBER(1)            DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLO_TRADE_MONEY"
ADD CONSTRAINT PK_RLO_TRADE_MONEY PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLO_TRADE_RECONCILIATION"                            */
/*==============================================================*/
CREATE TABLE "RLO_TRADE_RECONCILIATION"
(
  "ID"                 VARCHAR(32)          NOT NULL,
  "TRADE_MONEY"        NUMBER(22)           DEFAULT 0 NOT NULL,
  "AMOUNT"             NUMERIC(24,4)        DEFAULT 0 NOT NULL,
  "ADJUST_MODE"        NUMBER(1)            DEFAULT 0 NOT NULL,
  "ADJUST_TIME"        DATE,
  "ADJUST_USER"        NVARCHAR2(50)
)
/

ALTER TABLE "RLO_TRADE_RECONCILIATION"
ADD CONSTRAINT PK_RLO_TRADE_RECONCILIATION PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLO_TRADEMONEY_RECORD"                               */
/*==============================================================*/
CREATE TABLE "RLO_TRADEMONEY_RECORD"
(
  "ID"                 VARCHAR(32)          NOT NULL,
  "TRADE_MONEY"        NUMBER(22)           DEFAULT 0 NOT NULL,
  "AUDIT_TIME"         DATE,
  "AUDITER"            NUMBER(12)           DEFAULT 0 NOT NULL,
  "AUDIT_NAME"         NVARCHAR2(50),
  "OPTION_MODE"        NUMBER(1)            DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLO_TRADEMONEY_RECORD"
ADD CONSTRAINT PK_RLO_TRADEMONEY_RECORD PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLP_ACCEPT_ORG"                                      */
/*==============================================================*/
CREATE TABLE "RLP_ACCEPT_ORG"
(
  "PRODUCT"            NUMBER(12)           NOT NULL,
  "NAME"               NVARCHAR2(120),
  "ICON"               NVARCHAR2(220),
  "ICON_ATTACHMENT"    NUMBER(18)           DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLP_ACCEPT_ORG"
ADD CONSTRAINT PK_RLP_ACCEPT_ORG PRIMARY KEY ("PRODUCT")
/

/*==============================================================*/
/* Table: "RLP_CLEARING_TIME"                                   */
/*==============================================================*/
CREATE TABLE "RLP_CLEARING_TIME"
(
  "PRODUCT"            NUMBER(12)           NOT NULL,
  "CLEARING_TIME"      NUMBER(2),
  "CLEARING_CYCLE"     NUMBER(1),
  "CLEARING_DAY"       NUMBER(6),
  "AUTO_FLAG"          CHAR(1)              DEFAULT 'N' NOT NULL,
  "PALYMONEY_TIME"     NUMBER(2)            DEFAULT 23 NOT NULL,
  "PALYMONEY_MIUTES"   NUMBER(2)            DEFAULT 59 NOT NULL
)
/

ALTER TABLE "RLP_CLEARING_TIME"
ADD CONSTRAINT PK_RLP_CLEARING_TIME PRIMARY KEY ("PRODUCT")
/

/*==============================================================*/
/* Table: "RLP_DETAILS"                                         */
/*==============================================================*/
CREATE TABLE "RLP_DETAILS"
(
  "ID"                 NUMBER(14)           NOT NULL,
  "PRODUCT"            NUMBER(12)           DEFAULT 0 NOT NULL,
  "ATTRIBUTE"          NUMBER(16)           DEFAULT 0 NOT NULL,
  "ATTRIBUTE_VAL"      CLOB,
  "ATTRIBUTE_VAL2"     CLOB,
  "DISPLAY_ORDER"      NUMBER(14)           DEFAULT 1 NOT NULL,
  "DISPLAY_FLAG"       CHAR(1)              DEFAULT 'Y' NOT NULL,
  "APP_ITEM"           NUMBER(14)           DEFAULT 0 NOT NULL,
  "FIELDS_FLAG"        CHAR(1)              DEFAULT 'N' NOT NULL,
  "RISK_FLAG"          CHAR(1)              DEFAULT 'N' NOT NULL
)
/

ALTER TABLE "RLP_DETAILS"
ADD CONSTRAINT PK_RLP_DETAILS PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLP_GROUP"                                           */
/*==============================================================*/
CREATE TABLE "RLP_GROUP"
(
  "ID"                 NUMBER(6)            NOT NULL,
  "NAME"               NVARCHAR2(60),
  "DESCRIPTION"        NVARCHAR2(250),
  "LOGO"               VARCHAR2(250),
  "ASSURE"             NUMBER(8)            DEFAULT 0 NOT NULL,
  "ASSURE_NAME"        NVARCHAR2(180),
  "ATTACHMENT"         NUMBER(18)           DEFAULT 0 NOT NULL,
  "INDEX_SHOW"         CHAR(1)              DEFAULT 'N' NOT NULL,
  "INDEX_IMGS"         NUMBER(2)            DEFAULT 0 NOT NULL,
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL,
  "TRANSFER_FLAG"      CHAR(1)              DEFAULT 'N' NOT NULL,
  "PRODUCT_FLAG"       CHAR(1)              DEFAULT 'Y' NOT NULL,
  "PRODUCTS"           NUMBER(6)            DEFAULT 0 NOT NULL,
  "DISPLAY_ORDER"      NUMBER(6)            DEFAULT 1 NOT NULL
)
/

ALTER TABLE "RLP_GROUP"
ADD CONSTRAINT PK_RLP_GROUP PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLP_ISSUER"                                          */
/*==============================================================*/
CREATE TABLE "RLP_ISSUER"
(
  "ID"                 NUMBER(8)            NOT NULL,
  "NAME"               NVARCHAR2(180),
  "LOGO"               VARCHAR2(255),
  "LOGO_ATTACHMENT"    NUMBER(18)           DEFAULT 0 NOT NULL,
  "CATEGORY"           VARCHAR2(20),
  "INTRO"              NVARCHAR2(1200),
  "CLEAR_RATE"         NUMBER(3)            DEFAULT 0 NOT NULL,
  "JOIN_TIME"          DATE,
  "CREATE_TIME"        DATE
)
/

ALTER TABLE "RLP_ISSUER"
ADD CONSTRAINT PK_RLP_ISSUER PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLP_ISSUER_PRODUCTS"                                 */
/*==============================================================*/
CREATE TABLE "RLP_ISSUER_PRODUCTS"
(
  "ID"                 NUMBER(12)           NOT NULL,
  "ISSUER"             NUMBER(8)            DEFAULT 0 NOT NULL,
  "PRODUCT"            NUMBER(8)            DEFAULT 0 NOT NULL,
  "CLEAR_RATE"         NUMBER(3)            DEFAULT 0 NOT NULL,
  "INCOME_MATH"        NVARCHAR2(250),
  "CATEGORY"           VARCHAR2(250)
)
/

ALTER TABLE "RLP_ISSUER_PRODUCTS"
ADD CONSTRAINT PK_RLP_ISSUER_PRODUCTS PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLP_PRODUCT"                                         */
/*==============================================================*/
CREATE TABLE "RLP_PRODUCT"
(
  "ID"                 NUMBER(12)           NOT NULL,
  "CODE"               CHAR(16),
  "NAME"               NVARCHAR2(180),
  "SIMPLE_CODE"        VARCHAR2(10),
  "BRAND"              NUMBER(10)           DEFAULT 0 NOT NULL,
  "GROUP_ID"           NUMBER(6)            DEFAULT 0 NOT NULL,
  "ISSUER"             NUMBER(8)            DEFAULT 0 NOT NULL,
  "ISSUER_NAME"        VARCHAR2(180),
  "LABELS"             NVARCHAR2(200),
  "COLLECTION_MODE"    NUMERIC(1),
  "CATEGORY"           NUMBER(1)            DEFAULT 1 NOT NULL,
  "YIELD"              NUMERIC(5,2)         DEFAULT 0 NOT NULL,
  "MILLION_INCOME"     NUMERIC(8,4)         DEFAULT 0 NOT NULL,
  "BASIC_DAYS"         NUMBER(3)            DEFAULT 365 NOT NULL,
  "TIME_LIMIT"         INTEGER              DEFAULT 0 NOT NULL,
  "TIME_LIMIT_UNIT"    VARCHAR2(20),
  "BEGIN_DATE"         DATE,
  "END_DATE"           DATE,
  "SALE_TIME"          NUMBER(2)            DEFAULT 0,
  "VALUEDATE_OFFSET"   NUMERIC(1)           DEFAULT 1 NOT NULL,
  "VALUEDATE"          DATE,
  "ENSURE_MODE"        VARCHAR(20),
  "DUE_DATE"           DATE,
  "EXPIRE_DATE"        DATE,
  "DUE_HONOUR_DATE"    DATE,
  "SALES_MANAGE_FEE"   NUMBER(24,2)         DEFAULT 0,
  "RISK_TOLERANCE"     NUMBER(1)            DEFAULT 1 NOT NULL,
  "INCREASE_AMOUNT"    NUMERIC(24, 4)       DEFAULT 0.0 NOT NULL,
  "MAX_INVEST_AMOUNT"  NUMERIC(24, 4)       DEFAULT 0.0 NOT NULL,
  "MIN_INVEST_AMOUNT"  NUMERIC(24, 4)       DEFAULT 0.0 NOT NULL,
  "REMAINING_AMOUNT"   NUMERIC(24, 4)       DEFAULT 0.0 NOT NULL,
  "PRICE"              NUMERIC(24, 4)       DEFAULT 0.0 NOT NULL,
  "RAISED_MOUNT"       NUMERIC(24, 4)       DEFAULT 0.0 NOT NULL,
  "HANDING_CHARGE"     NUMERIC(16, 4)       DEFAULT 0.00 NOT NULL,
  "PROGRESS"           NUMERIC(3)           DEFAULT 0,
  "DEAL_TIME"          DATE,
  "CELL_PHONE"         CHAR(1)              DEFAULT 'N' NOT NULL,
  "NEW_USER"           CHAR(1)              DEFAULT 'N' NOT NULL,
  "REDEEM_FLAG"        CHAR(1)              DEFAULT 'N' NOT NULL,
  "TRANSFER_FLAG"      CHAR(1)              DEFAULT 'N' NOT NULL,
  "TRANSFER_HOLDING_DAYS" NUMBER(6)            DEFAULT 0 NOT NULL,
  "LOGO"               VARCHAR2(250),
  "LOGO_ATTACHMENT"    NUMBER(18)           DEFAULT 0 NOT NULL,
  "PUBLISH_TIME"       DATE,
  "STATUS"             NUMBER(1)            DEFAULT 0 NOT NULL,
  "CREATE_TIME"        DATE,
  "LAST_UPDATE_TIME"   DATE,
  "RECOMMEND"          CHAR(1)              DEFAULT 'N',
  "RECOMMEND_TIME"     DATE,
  "SALES_AREA"         NVARCHAR2(1000),
  "REMARK"             CLOB,
  "CREATER"            NUMBER(20)           DEFAULT 0 NOT NULL,
  "CREATER_NAME"       NVARCHAR2(50),
  "FOUNDED_DATE"       DATE,
  "PRODUCT_TYPE"       VARCHAR(32)
)
/

ALTER TABLE "RLP_PRODUCT"
ADD CONSTRAINT PK_RLP_PRODUCT PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Index: "IDX_PRODUCT_BRAND"                                   */
/*==============================================================*/
CREATE INDEX "IDX_PRODUCT_BRAND" ON "RLP_PRODUCT" (
  "BRAND" ASC
)
/

/*==============================================================*/
/* Index: "IDX_ISSUER_PRODUCT"                                  */
/*==============================================================*/
CREATE INDEX "IDX_ISSUER_PRODUCT" ON "RLP_PRODUCT" (
  "ISSUER" ASC
)
/

/*==============================================================*/
/* Table: "RLP_PRODUCT_ATTR"                                    */
/*==============================================================*/
CREATE TABLE "RLP_PRODUCT_ATTR"
(
  "ID"                 NUMBER(16)           NOT NULL,
  "NAME"               NVARCHAR2(120),
  "DISPLAY_NAME"       NVARCHAR2(200),
  "DATA_TYPE"          VARCHAR2(20),
  "DESCRIPTION"        NVARCHAR2(250),
  "DISPLAY_ORDER"      NUMBER(16)           DEFAULT 1 NOT NULL,
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL
)
/

ALTER TABLE "RLP_PRODUCT_ATTR"
ADD CONSTRAINT PK_RLP_PRODUCT_ATTR PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLP_PRODUCT_BRAND"                                   */
/*==============================================================*/
CREATE TABLE "RLP_PRODUCT_BRAND"
(
  "ID"                 NUMBER(10)           NOT NULL,
  "NAME"               NVARCHAR2(120),
  "LOGO"               NVARCHAR2(280),
  "LOGO_ATTACHMENT"    NUMBER(18)           DEFAULT 0 NOT NULL,
  "INTRO"              NVARCHAR2(1200),
  "PERSONS"            NUMBER(18)           DEFAULT 0 NOT NULL,
  "AVG_YIELD"          NUMERIC(5,2)         DEFAULT 0 NOT NULL,
  "AMOUNT"             NUMERIC(18,4)        DEFAULT 0 NOT NULL,
  "TRANSFER_FLAG"      CHAR(1)              DEFAULT 'N' NOT NULL,
  "CREATE_TIME"        DATE,
  "SORT"               NUMBER(10)           DEFAULT 1 NOT NULL
)
/

ALTER TABLE "RLP_PRODUCT_BRAND"
ADD CONSTRAINT PK_RLP_PRODUCT_BRAND PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLP_PRODUCT_YIELDS"                                  */
/*==============================================================*/
CREATE TABLE "RLP_PRODUCT_YIELDS"
(
  "ID"                 NUMBER(18)           NOT NULL,
  "PRODUCT"            NUMBER(12)           DEFAULT 0 NOT NULL,
  "YIELD"              NUMERIC(5,2)         DEFAULT 0 NOT NULL,
  "MILLION_INCOME"     NUMERIC(8,4)         DEFAULT 0 NOT NULL,
  "UPDATE_TIME"        DATE,
  "SRC"                VARCHAR2(200),
  "INIT_FLAG"          CHAR(1)              DEFAULT 'N' NOT NULL
)
/

ALTER TABLE "RLP_PRODUCT_YIELDS"
ADD CONSTRAINT PK_RLP_PRODUCT_YIELDS PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLP_PURCHASE_LIMIT"                                  */
/*==============================================================*/
CREATE TABLE "RLP_PURCHASE_LIMIT"
(
  "PRODUCT"            NUMBER(12)           NOT NULL,
  "MIN_AGE_LIMIT"      NUMBER(5)            DEFAULT 0 NOT NULL,
  "MAX_AGE_LIMIT"      NUMBER(5)            DEFAULT 0 NOT NULL,
  "RISK_TOLERANCE_LIMIT" VARCHAR2(255),
  "BIND_BANK_CARD"     NUMBER(1)            DEFAULT 0 NOT NULL,
  "IDENTITY_VERIFICATION" NUMBER(1)            DEFAULT 0 NOT NULL,
  "MIN_AMOUNT"         NUMERIC(24,4)        DEFAULT 0.00 NOT NULL,
  "MIN_SHARE"          NUMBER(6)            DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLP_PURCHASE_LIMIT"
ADD CONSTRAINT PK_RLP_PURCHASE_LIMIT PRIMARY KEY ("PRODUCT")
/

/*==============================================================*/
/* Table: "RLS_ISMG"                                            */
/*==============================================================*/
CREATE TABLE "RLS_ISMG"
(
  "ID"                 VARCHAR2(32)         NOT NULL,
  "URL"                VARCHAR2(220),
  "USERNAME"           VARCHAR2(80),
  "PASSWORD"           VARCHAR2(120),
  "PORT"               VARCHAR2(25),
  "TEL"                VARCHAR2(35)
)
/

ALTER TABLE "RLS_ISMG"
ADD CONSTRAINT PK_RLS_ISMG PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLS_MODULE"                                          */
/*==============================================================*/
CREATE TABLE "RLS_MODULE"
(
  "ID"                 VARCHAR(32)          NOT NULL,
  "NAME"               NVARCHAR2(120),
  "CODE"               NVARCHAR2(25),
  "MENU"               NUMBER(1)            DEFAULT 0 NOT NULL,
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL,
  "PARENT"             VARCHAR(32)          DEFAULT '0' NOT NULL,
  "IMPORTANT"          NUMBER(1)            DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLS_MODULE"
ADD CONSTRAINT PK_RLS_MODULE PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLS_POINTS"                                          */
/*==============================================================*/
CREATE TABLE "RLS_POINTS"
(
  "ID"                 VARCHAR(32)          NOT NULL,
  "CODE"               NVARCHAR2(6),
  "NAME"               NVARCHAR2(120),
  "INTEGRAL"           NUMBER(8)            DEFAULT 0 NOT NULL,
  "INCREASING"         NUMBER(6)            DEFAULT 0 NOT NULL,
  "RATIO"              NUMBER(3)            DEFAULT 0 NOT NULL,
  "RATIO_VAL"          NUMBER(12)           DEFAULT 0 NOT NULL,
  "RATIO_UNIT"         VARCHAR2(25),
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL
)
/

ALTER TABLE "RLS_POINTS"
ADD CONSTRAINT PK_RLS_POINTS PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLS_RISK_RULE"                                       */
/*==============================================================*/
CREATE TABLE "RLS_RISK_RULE"
(
  "RISK_TOLERANCE"     NUMBER(1)            DEFAULT 0 NOT NULL,
  "RISK_LEVEL"         NVARCHAR2(20)        NOT NULL,
  "TYPE"               CHAR(1)              DEFAULT 'Y',
  "AMOUNT"             NUMERIC(24,4)        DEFAULT 0 NOT NULL,
  "DEAL"               NUMBER(6)            DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLS_RISK_RULE"
ADD CONSTRAINT PK_RLS_RISK_RULE PRIMARY KEY ("RISK_TOLERANCE")
/

/*==============================================================*/
/* Table: "RLS_ROLE"                                            */
/*==============================================================*/
CREATE TABLE "RLS_ROLE"
(
  "ID"                 VARCHAR(32)          NOT NULL,
  "NAME"               NVARCHAR2(120),
  "PERMISSIONS"        CLOB,
  "DESCRIPTION"        NVARCHAR2(255)
)
/

ALTER TABLE "RLS_ROLE"
ADD CONSTRAINT PK_RLS_ROLE PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLS_ROLERIGHT"                                       */
/*==============================================================*/
CREATE TABLE "RLS_ROLERIGHT"
(
  "ROLE"               VARCHAR(32)          DEFAULT '0' NOT NULL,
  "MODULE"             VARCHAR(32)          DEFAULT '0' NOT NULL
)
/

ALTER TABLE "RLS_ROLERIGHT"
ADD CONSTRAINT PK_RLS_ROLERIGHT PRIMARY KEY ("ROLE", "MODULE")
/

/*==============================================================*/
/* Table: "RLS_SETTINGS"                                        */
/*==============================================================*/
CREATE TABLE "RLS_SETTINGS"
(
  "ID"                 VARCHAR(32)          NOT NULL,
  "VAL_ITEM"           NVARCHAR2(120),
  "VAL_NAME"           NVARCHAR2(1200),
  "VAL_TXT"            NVARCHAR2(2000),
  "CREATE_TIME"        DATE,
  "DESCRIPTION"        CLOB,
  "CREATE_USER"        NVARCHAR2(120),
  "LAST_UPDATE_USER"   NVARCHAR2(120),
  "LAST_UPDATE_TIME"   DATE
)
/

ALTER TABLE "RLS_SETTINGS"
ADD CONSTRAINT PK_RLS_SETTINGS PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLS_TLOG"                                            */
/*==============================================================*/
CREATE TABLE "RLS_TLOG"
(
  "ID"                 NUMBER(18)           NOT NULL,
  "OPERATOR"           NUMBER(8)            DEFAULT 0 NOT NULL,
  "OPERATOR_NAME"      NVARCHAR2(30),
  "MODULE_ID"          NUMBER(4)            DEFAULT 0 NOT NULL,
  "MODULE_NAME"        NVARCHAR2(120),
  "DATETINE"           DATE,
  "IP"                 CHAR(16),
  "CONTENT"            NVARCHAR2(1200),
  "RECORD_TIME"        DATE,
  "EXCEPTION_FLAG"     CHAR(1)              DEFAULT 'N' NOT NULL
)
/

ALTER TABLE "RLS_TLOG"
ADD CONSTRAINT PK_RLS_TLOG PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLS_USER"                                            */
/*==============================================================*/
CREATE TABLE "RLS_USER"
(
  "ID"                 NUMBER(12)           NOT NULL,
  "USERNAME"           VARCHAR2(30),
  "NICKNAME"           NVARCHAR2(60),
  "PASSWORD"           VARCHAR2(64),
  "SALT"               CHAR(16),
  "GENDER"             NUMBER(1)            DEFAULT 0 NOT NULL,
  "EMAIL"              NVARCHAR2(120),
  "PHONE"              VARCHAR2(16),
  "POSITION"           NVARCHAR2(120),
  "ROLE"               NVARCHAR2(1000),
  "ROLE_NAME"          NVARCHAR2(1000),
  "ORGANIZATION"       NUMBER(8)            DEFAULT 0 NOT NULL,
  "ORG_NAME"           NVARCHAR2(120),
  "LAST_LOGIN_TIME"    DATE,
  "LAST_LOGIN_IP"      CHAR(16),
  "SUPER_ADMIN"        NUMBER(1)            DEFAULT 0 NOT NULL,
  "CUSTOMER"           NUMBER(1)            DEFAULT 0 NOT NULL,
  "STATUS"             NUMBER(1)            DEFAULT 1 NOT NULL,
  "ISSUER_USER"        NUMBER(16)           DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLS_USER"
ADD CONSTRAINT PK_RLS_USER PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLT_PRODUCT"                                         */
/*==============================================================*/
CREATE TABLE "RLT_PRODUCT"
(
  "ID"                 NUMBER(18)           NOT NULL,
  "PRODUCT"            NUMBER(12)           DEFAULT 0 NOT NULL,
  "PRODUCT_NAME"       NVARCHAR2(120),
  "MEMBER_PRODUCT"     NUMBER(21)           DEFAULT 0 NOT NULL,
  "LOGO"               VARCHAR2(250),
  "TYPE"               NUMBER(1)            DEFAULT 1 NOT NULL,
  "PRICE"              NUMERIC(24,4)        DEFAULT 0 NOT NULL,
  "YIELD"              NUMERIC(5,2)         DEFAULT 0 NOT NULL,
  "REMAINING_DAYS"     NUMBER(6)            DEFAULT 0 NOT NULL,
  "ASSIGNOR"           NUMBER(18)           DEFAULT 0 NOT NULL,
  "ASSIGNOR_PHONE"     VARCHAR2(30),
  "HOLD_DAYS"          NUMBER(6)            DEFAULT 1 NOT NULL,
  "HANDING_CHARGE"     NUMERIC(18,2)        NOT NULL,
  "TRANSFER_DATE"      DATE,
  "TRANSFER_TIME"      DATE,
  "PUT_TIME"           DATE,
  "AUDIT_TIME"         DATE,
  "ORDER_ID"           NUMBER(21)           DEFAULT 0 NOT NULL,
  "CREATE_TIME"        DATE,
  "STATUS"             NUMBER(1)            DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLT_PRODUCT"
ADD CONSTRAINT PK_RLT_PRODUCT PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLT_TRANFER_MODE"                                    */
/*==============================================================*/
CREATE TABLE "RLT_TRANFER_MODE"
(
  "TRANFER"            NUMBER(18)           NOT NULL,
  "MODE_TYPE"          CHAR(5)              DEFAULT 'PRICE' NOT NULL,
  "PRICE"              NUMERIC(24,4),
  "AGING"              NUMBER(2)            DEFAULT 24 NOT NULL,
  "SPLIT_SIZE"         NUMBER(8)            DEFAULT 0 NOT NULL,
  "UNIT_PRICE"         NUMERIC(24, 4)       DEFAULT 0 NOT NULL,
  "SPLIT_YIELD"        NUMBER(4)            DEFAULT 0 NOT NULL,
  "CREATE_TIME"        DATE
)
/

ALTER TABLE "RLT_TRANFER_MODE"
ADD CONSTRAINT PK_RLT_TRANFER_MODE PRIMARY KEY ("TRANFER")
/

/*==============================================================*/
/* Table: "RLT_TRANFER_TRADE"                                   */
/*==============================================================*/
CREATE TABLE "RLT_TRANFER_TRADE"
(
  "ID"                 NUMBER(21)           NOT NULL,
  "CODE"               CHAR(16),
  "TRANFER"            NUMBER(18)           DEFAULT 0 NOT NULL,
  "MODALITY"           CHAR(5),
  "PRODUCT"            NUMBER(12)           DEFAULT 0 NOT NULL,
  "PRODUCT_NAME"       NVARCHAR2(120),
  "ASSIGNOR"           NUMBER(18),
  "ASSIGNEE"           NUMBER(18),
  "AMOUNT"             NUMERIC(24,4),
  "TRADE_TIME"         DATE,
  "CREATE_TIME"        DATE,
  "ORDER_ID"           NUMBER(21)           DEFAULT 0 NOT NULL,
  "LODGING_FEE"        NUMERIC(18,2)        DEFAULT 0,
  "LODGING_HOURS"      NUMBER(10)           DEFAULT 0,
  "STATUS"             NUMBER(1)            DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLT_TRANFER_TRADE"
ADD CONSTRAINT PK_RLT_TRANFER_TRADE PRIMARY KEY ("ID")
/

/*==============================================================*/
/* Table: "RLT_TRANSFER_RULE"                                   */
/*==============================================================*/
CREATE TABLE "RLT_TRANSFER_RULE"
(
  "ID"                 VARCHAR2(32)         NOT NULL,
  "RATIO"              NUMERIC(5,2)         DEFAULT 0 NOT NULL,
  "AGING"              NUMBER(5)            DEFAULT 0 NOT NULL,
  "FREE_TIMES"         NUMBER(5)            DEFAULT 0 NOT NULL,
  "LODGING_FEE"        NUMERIC(10,2)        DEFAULT 0 NOT NULL
)
/

ALTER TABLE "RLT_TRANSFER_RULE"
ADD CONSTRAINT PK_RLT_TRANSFER_RULE PRIMARY KEY ("ID")
/


CREATE TRIGGER "TIB_RLA_INTERFACECALLRECORD" BEFORE INSERT
ON "RLA_INTERFACECALLRECORD" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLA_INTERFACECALLRECORD
    SELECT S_RLA_INTERFACECALLRECORD.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLA_LOGINLOG" BEFORE INSERT
ON "RLA_LOGINLOG" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLA_LOGINLOG
    SELECT S_RLA_LOGINLOG.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLP_TRACK_RECORD" BEFORE INSERT
ON "RLA_PRODUCT_RECORD" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLP_TRACK_RECORD
    SELECT S_RLP_TRACK_RECORD.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLA_SMSRECORD" BEFORE INSERT
ON "RLA_SMSRECORD" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLA_SMSRECORD
    SELECT S_RLA_SMSRECORD.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLB_ATTACHMENT" BEFORE INSERT
ON "RLB_ATTACHMENT" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLB_ATTACHMENT
    SELECT S_RLB_ATTACHMENT.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLB_HOTNEWS" BEFORE INSERT
ON "RLB_HOTNEWS" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLB_HOTNEWS
    SELECT S_RLB_HOTNEWS.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLB_INDEXPIC" BEFORE INSERT
ON "RLB_INDEXPIC" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN "ID" USES SEQUENCE S_RLB_INDEXPIC
    SELECT S_RLB_INDEXPIC.NEXTVAL INTO :NEW.ID FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLB_MSGS" BEFORE INSERT
ON "RLB_MSGS" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLB_MSGS
    SELECT S_RLB_MSGS.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLB_NOTES" BEFORE INSERT
ON "RLB_NOTES" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLB_NOTES
    SELECT S_RLB_NOTES.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLB_NOTICE" BEFORE INSERT
ON "RLB_NOTICE" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLB_NOTICE
    SELECT S_RLB_NOTICE.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLB_RISK_CATEGORY" BEFORE INSERT
ON "RLB_RISK_CATEGORY" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLB_RISK_CATEGORY
    SELECT S_RLB_RISK_CATEGORY.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLB_RISK_MODEL" BEFORE INSERT
ON "RLB_RISK_MODEL" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLB_RISK_MODEL
    SELECT S_RLB_RISK_MODEL.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLB_RISK_OPTIONS" BEFORE INSERT
ON "RLB_RISK_OPTIONS" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLB_RISK_OPTIONS
    SELECT S_RLB_RISK_OPTIONS.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLB_RISK_PROBLEM" BEFORE INSERT
ON "RLB_RISK_PROBLEM" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLB_RISK_PROBLEM
    SELECT S_RLB_RISK_PROBLEM.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_STORY_SHARE" BEFORE INSERT
ON "RLB_STORY_SHARE" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_STORY_SHARE
    SELECT S_STORY_SHARE.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLD_ABOUT_US" BEFORE INSERT
ON "RLD_ABOUT_US" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN "ID" USES SEQUENCE S_RLD_ABOUT_US
    SELECT S_RLD_ABOUT_US.NEXTVAL INTO :NEW.ID FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLD_APPHOME_STAT" BEFORE INSERT
ON "RLD_APPHOME_STAT" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLD_APPHOME_STAT
    SELECT S_RLD_APPHOME_STAT.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLD_APPMOBILE" BEFORE INSERT
ON "RLD_APPMOBILE" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLD_APPMOBILE
    SELECT S_RLD_APPMOBILE.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLD_PRODUCT_DETAILS" BEFORE INSERT
ON "RLD_PRODUCT_DETAILS" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLD_PRODUCT_DETAILS
    SELECT S_RLD_PRODUCT_DETAILS.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLD_PRODUCT_RECOMMEND" BEFORE INSERT
ON "RLD_PRODUCT_RECOMMEND" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLD_PRODUCT_RECOMMEND
    SELECT S_RLD_PRODUCT_RECOMMEND.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLD_TOP_SHUFFLING" BEFORE INSERT
ON "RLD_TOP_SHUFFLING" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLD_TOP_SHUFFLING
    SELECT S_RLD_TOP_SHUFFLING.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLD_ZONE_CONTENT" BEFORE INSERT
ON "RLD_ZONE_CONTENT" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLD_ZONE_CONTENT
    SELECT S_RLD_ZONE_CONTENT.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLI_BANK" BEFORE INSERT
ON "RLI_BANK" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLI_BANK
    SELECT S_RLI_BANK.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLI_INTERFACE" BEFORE INSERT
ON "RLI_INTERFACE" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLI_INTERFACE
    SELECT S_RLI_INTERFACE.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLM_ACCOUNT_AMOUNT" BEFORE INSERT
ON "RLM_ACCOUNT_AMOUNT" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLM_ACCOUNT_AMOUNT
    SELECT S_RLM_ACCOUNT_AMOUNT.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLM_BANK_CARD" BEFORE INSERT
ON "RLM_BANK_CARD" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLM_BANK_CARD
    SELECT S_RLM_BANK_CARD.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLM_INTEGRAL_RECORDS" BEFORE INSERT
ON "RLM_INTEGRAL_RECORDS" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLM_INTEGRAL_RECORDS
    SELECT S_RLM_INTEGRAL_RECORDS.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLM_INVITE" BEFORE INSERT
ON "RLM_INVITE" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLM_INVITE
    SELECT S_RLM_INVITE.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLM_MEMBER" BEFORE INSERT
ON "RLM_MEMBER" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLM_MEMBER
    SELECT S_RLM_MEMBER.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLM_MEMBER_LOCK" BEFORE INSERT
ON "RLM_MEMBER_LOCK" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLM_MEMBER_LOCK
    SELECT S_RLM_MEMBER_LOCK.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLM_PRODUCT" BEFORE INSERT
ON "RLM_MEMBER_PRODUCT" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLM_PRODUCT
    SELECT S_RLM_PRODUCT.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLM_PROFIT_DETAILS" BEFORE INSERT
ON "RLM_PROFIT_DETAILS" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLM_PROFIT_DETAIL
    SELECT S_RLM_PROFIT_DETAIL.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLM_SECURITY" BEFORE INSERT
ON "RLM_SECURITY" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLM_SECURITY
    SELECT S_RLM_SECURITY.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLO_BANK_CHECKACCOUNT" BEFORE INSERT
ON "RLO_CHECK_ACCOUNT" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLO_CHECKACCOUNT
    SELECT S_RLO_CHECKACCOUNT.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLO_ORDER" BEFORE INSERT
ON "RLO_ORDER" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLO_ORDER
    SELECT S_RLO_ORDER.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLO_TRADE_MONEY" BEFORE INSERT
ON "RLO_TRADE_MONEY" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLO_TRADE_MONEY
    SELECT S_RLO_TRADE_MONEY.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLP_DETAILS" BEFORE INSERT
ON "RLP_DETAILS" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLP_DETAILS
    SELECT S_RLP_DETAILS.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLP_GROUP" BEFORE INSERT
ON "RLP_GROUP" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLP_GROUP
    SELECT S_RLP_GROUP.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLP_ISSUER" BEFORE INSERT
ON "RLP_ISSUER" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLP_ISSUER
    SELECT S_RLP_ISSUER.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLP_ISSUER_PRODUCTS" BEFORE INSERT
ON "RLP_ISSUER_PRODUCTS" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLP_ISSUER_PRODUCTS
    SELECT S_RLP_ISSUER_PRODUCTS.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLP_PRODUCT" BEFORE INSERT
ON "RLP_PRODUCT" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLP_PRODUCT
    SELECT S_RLP_PRODUCT.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLP_ATTR" BEFORE INSERT
ON "RLP_PRODUCT_ATTR" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLP_ATTR
    SELECT S_RLP_ATTR.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLP_PRODUCT_BRAND" BEFORE INSERT
ON "RLP_PRODUCT_BRAND" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLP_PRODUCT_BRAND
    SELECT S_RLP_PRODUCT_BRAND.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLP_PRODUCT_YIELDS" BEFORE INSERT
ON "RLP_PRODUCT_YIELDS" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLP_PRODUCT_YIELDS
    SELECT S_RLP_PRODUCT_YIELDS.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLS_TLOG" BEFORE INSERT
ON "RLS_TLOG" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLS_TLOG
    SELECT S_RLS_TLOG.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLS_USER" BEFORE INSERT
ON "RLS_USER" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLS_USER
    SELECT S_RLS_USER.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLT_PRODUCT" BEFORE INSERT
ON "RLT_PRODUCT" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLT_PRODUCT
    SELECT S_RLT_PRODUCT.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/


CREATE TRIGGER "TIB_RLT_TRANFER_TRADE" BEFORE INSERT
ON "RLT_TRANFER_TRADE" FOR EACH ROW
  DECLARE
      INTEGRITY_ERROR  EXCEPTION;
    ERRNO            INTEGER;
    ERRMSG           CHAR(200);
    DUMMY            INTEGER;
    FOUND            BOOLEAN;

  BEGIN
    --  COLUMN ""ID"" USES SEQUENCE S_RLT_TRANFER_TRADE
    SELECT S_RLT_TRANFER_TRADE.NEXTVAL INTO :NEW."ID" FROM DUAL;

    --  ERRORS HANDLING
    EXCEPTION
    WHEN INTEGRITY_ERROR THEN
    RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
  END;
/

